-3

When is the keyup event used and when is the keydown event used in JQuery? Why are these two separate events?

shaam
  • 106
  • 14
  • Read it here: http://howtodoinjava.com/2013/12/20/jquery-difference-between-keypress-and-keydown-events/ – Michel Jun 24 '15 at 16:34
  • I am pretty sure the functionality is the same. Trigger event when key is pressed down, trigger event when the key is let go (keyup) – floor Jun 24 '15 at 16:37
  • 2
    Do you know how to use google? –  Jun 24 '15 at 16:38

1 Answers1

2

Keydown: The keydown event is sent to an element when the user first presses a key on the keyboard. (when key is down)

Keyup: The keyup event is sent to an element when the user releases a key on the keyboard. (when key is released)

refer What's the theory behind jQuery keypress, keydown, keyup black magic (on Macs)?

Community
  • 1
  • 1
KDP
  • 1,481
  • 7
  • 13