Keyboard Scan Codes

When keys on a keyboard are pressed they send a number that can be interpretted by the computer. They are called Scan Codes.

The below table lists all the scan codes returned when keys or cominations of keys are pressed on a 101-key enhanced U.S. keyboard.

Return codes listed here are in decimal.

 

Key Alone Shift Ctrl Alt
Esc1111
1 and !22120
2 and @333121
3 and #44122
4 and $55123
5 and %66124
6 and ^777125
7 and &88126
8 and *99127
9 and (1010128
0 and )1111129
- and _121212130
= and +1313131
Backspace14141414
Tab1515148165
Q16161616
W17171717
E18181818
R19191919
T20202020
Y21212121
U22222222
I23232323
O24242424
P25252525
[ and {26262626
] and }27272727
Enter28282828
A30303030
S31313131
D32323232
F33333333
G34343434
H35353535
J36363636
K37373737
L38383838
; and :393939
' and "404040
` and �414141
\ and |43434343
Z44444444
X45454545
C46464646
V47474747
B48484848
N49494949
M50505050
, and <515151
. and >525252
/ and ?535353
Space57575757
F1598494104
F2608595105
F3618696106
F4628797107
F5638898108
F6648999109
F76590100110
F86691101111
F96792102112
F106893103113
F11133135137139
F12134136138140
NumPad Asterisk555515055
NumPad Home7171119151
NumPad Arrow Up7272141152
NumPad PgUp7373132153
NumPad Minus747414274
NumPad Arrow Left7575115155
NumPad NumPad 57676143
NumPad Arrow Right7777116157
NumPad Plus787814478
NumPad End7979117159
NumPad Arrow Down8080145160
NumPad PgDn8181118161
Insert8282146162
Delete8383147163
NumPad /224224149164
NumPad Enter224224224166

Related Pages