Core JavaScript

Key Code Table

Click to test a KeyCode

Key codes differ from chracter codes in that they correspond to physical keys on the keyboard. So, where as 'a' and 'A' are two distinct character codes, they represent the same key code for the 'A' key. Key codes can differ from browser to browser. To test a key and find its value in your current browser, click the box on the left and press keys to see their key codes.

KeyKey Code
back space8
tab9
enter13
shift16
ctrl17
alt18
pause break19
caps lock20
esc27
space32
pgup33
pgdn34
end35
home36
left arrow37
up arrow38
right arrow39
down arrow40
prtsc sysqr44 *
ins45
del46
0 )48
1 !49
2 @50
3 #51
4 $52
5 %53
6 ^54
7 &55
8 *56
9 (57
a65
b66
KeyKey Code
c67
d68
e69
f70
g71
h72
i73
j74
k75
l76
m77
n78
o79
p80
q81
r82
s83
t84
u85
v86
w87
x88
y89
z90
windows key91 *
windows menu93 *
numpad 096 *
numpad 197 *
numpad 298 *
numpad 399 *
numpad 4100 *
numpad 5101 *
numpad 6102 *
KeyKey Code
numpad 7103 *
numpad 8104 *
numpad 9105 *
numpad *106 *
numpad +107 *
numpad -109 *
numpad . del110 *
numpad /111 *
f1112
f2113
f3114
f4115
f5116
f6117
f7118
f8119
f9120
f10121
f11122
f12123
num lock144
scroll lock145
; :186 *
= +187 *
, <188
- _189 *
. >190
/ ?191
` ~192
[ {219
\ |220
] }221
' "222


* - the key code is not the same across all browsers. Most commonly, this is due to a difference in the Opera browser.

 
 

© 2007–2024 XoaX.net LLC. All rights reserved.