jQuery Keycode Cheatsheet - ku-fpg/blackboard GitHub Wiki
From http://mikemurko.com/general/jquery-keycode-cheatsheet/
These are just Javascript keycodes, but when I searched originally I typed in “jQuery keycodes” and didn’t get much. This should be of help to someone in any case. Cheat away!
It’s useful for when you’re using the keydown, keypress, and keyup functions in jQuery. You’d use them in a way like this:
$('#textbox').keyup(function (e) {
if (e.keyCode == 13) {
alert('Enter key pressed!');
}
});
| Key | Keycode |
|---|---|
| Enter | 13 |
| Up arrow | 38 |
| Down arrow | 40 |
| Left arrow | 37 |
| Right arrow | 39 |
| Escape | 27 |
| Spacebar | 32 |
| Ctrl | 17 |
| Alt | 18 |
| Tab | 9 |
| Shift | 16 |
| Caps-lock | 20 |
| Windows key | 91 |
| Windows option key | 93 |
| Backspace | 8 |
| Home | 36 |
| End | 35 |
| Insert | 45 |
| Delete | 46 |
| Page Up | 33 |
| Page Down | 34 |
| Numlock | 144 |
| F1-F12 | 112-123 |
| Print-screen | ?? |
| Scroll-lock | 145 |
| Pause-break | 19 |