JavaScript KeyCode

Reference JavaScript

Share

List of Keycode and Key used in JavaScript.

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