nn2 nn2 - 9 months ago 50
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..



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