Find which keyboard keys usually correspond to the values 0 to 255 of the deprecated and inconsistent e.which
, e.keyCode
and e.charCode
KeyboardEvent
properties in the table below:
Key Code | Key Description |
---|---|
0 | Unidentified key |
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | Backspace |
9 | Tab |
10 | |
11 | |
12 | Clear |
13 | Enter |
14 | |
15 | |
16 | Shift |
17 | Control |
18 | Alt |
19 | Pause/Break |
20 | Caps Lock |
21 | |
22 | |
23 | |
24 | |
25 | |
26 | |
27 | Escape |
28 | |
29 | |
30 | |
31 | |
32 | Space Bar |
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 / Snapshot |
45 | Insert |
46 | Delete |
47 | Help |
48 | 0 |
49 | 1 |
50 | 2 |
51 | 3 |
52 | 4 |
53 | 5 |
54 | 6 |
55 | 7 |
56 | 8 |
57 | 9 |
58 | |
59 | |
60 | |
61 | |
62 | |
63 | |
64 | |
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 | Left Window/Meta/OS Key |
92 | Right Window/Meta/OS Key |
93 | Context Menu |
94 | |
95 | |
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 | Keypad Enter |
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 |
136 | F25 |
137 | F26 |
138 | F27 |
139 | F28 |
140 | F29 |
141 | F30 |
142 | F31 |
143 | F32 |
144 | Num Lock |
145 | Scroll Lock |
146 | |
147 | |
148 | |
149 | |
150 | |
151 | |
152 | |
153 | |
154 | |
155 | |
156 | |
157 | |
158 | |
159 | |
160 | |
161 | |
162 | |
163 | |
164 | |
165 | |
166 | Navigate/Page Back |
167 | Navigate/Page Forward |
168 | Reload/Refresh Page |
169 | |
170 | |
171 | |
172 | |
173 | |
174 | Audio Volume Down |
175 | Audio Volume Up |
176 | |
177 | |
178 | |
179 | |
180 | |
181 | |
182 | |
183 | |
184 | |
185 | |
186 | Semi-colon |
187 | Equal Sign |
188 | Comma |
189 | Dash |
190 | Period |
191 | Forward Slash |
192 | Grave Accent |
193 | |
194 | |
195 | |
196 | |
197 | |
198 | |
199 | |
200 | |
201 | |
202 | |
203 | |
204 | |
205 | |
206 | |
207 | |
208 | |
209 | |
210 | |
211 | |
212 | |
213 | |
214 | |
215 | |
216 | |
217 | |
218 | |
219 | Open Bracket |
220 | Back Slash |
221 | Close Bracket |
222 | Single Quote |
223 | |
224 | |
225 | |
226 | |
227 | |
228 | |
229 | |
230 | |
231 | |
232 | |
233 | |
234 | |
235 | |
236 | |
237 | |
238 | |
239 | |
240 | |
241 | |
242 | |
243 | |
244 | |
245 | |
246 | |
247 | |
248 | |
249 | |
250 | |
251 | |
252 | |
253 | |
254 | |
255 |
Double-click a value to copy.
KeyboardEvent | keydown | keypress | keyup |
---|---|---|---|
e.key | |||
e.code | |||
e.repeat | |||
e.location | |||
e.isComposing | |||
e.shiftKey | |||
e.ctrlKey | |||
e.altKey | |||
e.metaKey | |||
e.which | |||
e.keyCode | |||
e.charCode | |||
e.keyIdentifier |
Double-click a value to copy. Check out the complete event log on the console (F12).
Show lessOn Windows, some characters without a dedicated key can be entered using the Alt + Numpad or Alt Code input method.
This is done by pressing and holding the ⌥ Alt key while typing a number that identifies the character, using the keyboard's numeric keypad, then releasing ⌥ Alt.
While this method only works on Windows, a similar method is available in most Unix or Unix-like OSs by holding down ⌃ Ctrl + ⇧ Shift + U, releasing them, then typing the hex number of an Unicode character and finally pressing the Spacebar or ↵ Enter key.
When using virtual/mobile keyboards, formally known as IME (Input-Method Editor), the W3C standard states that a KeyboardEvent's e.keyCode should be 229 and e.key should be "Unidentified".
However, Key.js will soon infer those values from other events so that you can use the App even on your phone!
Double-click a value to copy. Check out the complete event log on the console (F12).
Show more