nn2 nn2 - 1 year ago 118
jQuery Question

What is the jQuery key code for Left Shift

What's the key code for left shift? When I press left shift do something..


Answer Source

With JavaScript you can only detect Shift. You can't differentiate left and right shift. Using jQuery:

$("body").keypress(function(event) {
  if (event.shiftKey) {
    //do something here
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download