Key codes

This is a list of common key code values that may be used for keybinds, along with names of keys they correspond to. Keep in mind that these may be affected by the keyboard layout; you may need to do a bit of experimentation.

The values are Windows virtual-key codes defined in Winuser.h.

Key code table

Key nameCode
BACKSPACE8
TAB9
CLEAR12
ENTER13
PAUSE19
CAPS LOCK20
ESCAPE27
SPACEBAR32
PAGE UP33
PAGE DOWN34
END35
HOME36
LEFT ARROW37
UP ARROW38
RIGHT ARROw39
DOWN ARROW40
048
149
250
351
452
553
654
755
856
957
A65
B66
C67
D68
E69
F70
G71
H72
I73
J74
K75
L76
M77
N78
O79
P80
Q81
R82
S83
T84
U85
V86
W87
X88
Y89
Z90
SLEEP95
NUMPAD096
NUMPAD197
NUMPAD298
NUMPAD399
NUMPAD4100
NUMPAD5101
NUMPAD6102
NUMPAD7103
NUMPAD8104
NUMPAD9105
MULTIPLY106
ADD107
SEPARATOR108
SUBTRACT109
DECIMAL110
DIVIDE111
F1112
F2113
F3114
F4115
F5116
F6117
F7118
F8119
F9120
F10121
F11122
F12123
F13124
F14125
F15126
F16127
F17128
F18129
F19130
F20131
F21132
F22133
F23134
F24135
;186
=187
,188
-189
.190
/191
`192
[219
\220
]221
'222
<226