Reference JavaScript
List of Keycode and Key used in JavaScript.
//jQuery
$("#target").on("keydown", function(e) {
console.log(e.keyCode);
});
Keycode | Key |
---|---|
3 | Break |
8 | Backspace/Delete |
9 | Tab |
12 | Clear |
13 | Enter |
16 | Shift |
17 | Ctrl |
18 | Alt |
19 | Pause/Break |
20 | Caps Lock |
27 | Escape |
32 | Spacebar |
33 | Page Up |
34 | Page Down |
35 | End |
36 | Home |
37 | Left Arrow |
38 | Up Arrow |
39 | Right Arrow |
40 | Down Arrow |
41 | Select |
42 | |
43 | Execute |
44 | Print Screen |
45 | Insert |
46 | Delete |
48 | 0 |
49 | 1 |
50 | 2 |
51 | 3 |
52 | 4 |
53 | 5 |
54 | 6 |
55 | 7 |
56 | 8 |
57 | 9 |
58 | : |
59 | Semicolon |
60 | < |
61 | Equals |
65 | a |
66 | b |
67 | c |
68 | d |
69 | e |
70 | f |
71 | g |
72 | h |
73 | i |
74 | j |
75 | k |
76 | l |
77 | m |
78 | n |
79 | o |
80 | p |
81 | q |
82 | r |
83 | s |
84 | t |
85 | u |
86 | v |
87 | w |
88 | x |
89 | y |
90 | z |
91 | Windows Key / Left ⌘ |
92 | Right Window key |
93 | Windows Menu / Right ⌘ |
96 | Numpad 0 |
97 | Numpad 1 |
98 | Numpad 2 |
99 | Numpad 3 |
100 | Numpad 4 |
101 | Numpad 5 |
102 | Numpad 6 |
103 | Numpad 7 |
104 | Numpad 8 |
105 | Numpad 9 |
106 | Multiply |
107 | Add |
108 | Numpad period |
109 | Subtract |
110 | Decimal point |
111 | Divide |
112 | F1 |
113 | F2 |
114 | F3 |
115 | F4 |
116 | F5 |
117 | F6 |
118 | F7 |
119 | F8 |
120 | F9 |
121 | F10 |
122 | F11 |
123 | F12 |
124 | F13 |
125 | F14 |
126 | F15 |
127 | F16 |
128 | F17 |
129 | F18 |
130 | F19 |
131 | F20 |
132 | F21 |
133 | F22 |
134 | F23 |
135 | F24 |
144 | Num Lock |
145 | Scroll Lock |
160 | ^ |
161 | ! |
163 | # |
164 | $ |
166 | Page Backward |
167 | Page Forward |
170 | * |
187 | Equal sign |
188 | Comma |
189 | Dash |
190 | Period |
191 | Forward slash / |
219 | Open Bracket |
220 | Back slash \ |
221 | Close Bracket |
222 | Single Quote |
223 | ` |
ADVERTISEMENT