$(document).keydown(<handler>)
$(document).keyup(<handler>)
KeyboardEvent
object.KeyboardEvent
here.KeyboardEvent
Name | Type | Meaning |
---|---|---|
key |
String | The string representing the key value of the key pressed. For examples, 'a', 'b', 'Alt', 'ArrowLeft', etc. |
ctrlKey |
Boolean | Whether the Ctrl key is pressed when the event was fired. |
altKey |
Boolean | Whether the Alt key is pressed when the event was fired. |
shiftKey |
Boolean | Whether the Shift key is pressed when the event was fired. |
metaKey |
Boolean | Whether the Meta key (Mac) is pressed when the event was fired. |
Press a key and I'll tell you what's going on.