Computing » Keyboard scancodes

This content is archived! While this page is no longer maintained and may not accurately reflect nor portray up-to-date opinions or information, its content is kept accessible for reasons such as historical interest or accountability.

A condensed, concise table of computer keyboard scancodes, largely based off Andries Brouwer’s extensive scancode resources.

Keycaps are according to a standard US QWERTY keyboard. Hover over key numbers and scancodes for their values in hexadecimal and decimal, respectively.

Additional sources

“Standard” IBM AT Layout

IBM
Key №
Keycap
(USA)
Set 1 Set 2 Set 3 Sun Type 5 USB
HID
Make Break Make Break Make Break Make Break
1 ` ~ 29 A9 0E F0,0E 0E F0,0E 2A 35
2 1 ! 02 82 16 F0,16 16 F0,16 1E 1E
3 2 @ 03 83 1E F0,1E 1E F0,1E 1F 1F
4 3 # 04 84 26 F0,26 26 F0,26 20 20
5 4 $ 05 85 25 F0,25 25 F0,25 21 21
6 5 % 06 86 2E F0,2E 2E F0,2E 22 22
7 6 ^ 07 87 36 F0,36 36 F0,36 23 23
8 7 & 08 88 3D F0,3D 3D F0,3D 24 24
9 8 * 09 89 3E F0,3E 3E F0,3E 25 25
10 9 ( 0A 8A 46 F0,46 46 F0,46 26 26
11 0 ) 0B 8B 45 F0,45 45 F0,45 27 27
12 - _ 0C 8C 4E F0,4E 4E F0,4E 28 2D
13 = + 0D 8D 55 F0,55 55 F0,55 29 2E
15 Backspace 0E 8E 66 F0,66 66 F0,66 2B 2A
16 Tab 0F 8F 0D F0,0D 0D F0,0D 35 2B
17 Q 10 90 15 F0,13 15 F0,13 36 14
18 W 11 91 1D F0,1D 1D F0,1D 37 1A
19 E 12 92 24 F0,24 24 F0,24 38 08
20 R 13 93 2D F0,2D 2D F0,2D 39 155
21 T 14 94 2C F0,2C 2C F0,2C 3A 17
22 Y 15 95 35 F0,35 35 F0,35 3B 1C
23 U 16 96 3C F0,3C 3C F0,3C 3C 18
24 I 17 97 43 F0,43 43 F0,43 3D 0C
25 O 18 98 44 F0,44 44 F0,44 3E 12
26 P 19 99 4D F0,4D 4D F0,4D 3F 13
27 [ { 1A 9A 54 F0,54 54 F0,54 40 2F
28 ] } 1B 9B 5B F0,5B 5B F0,5B 41 30
29 \ | 2B AB 5D F0,5D 5C F0,5D 58 31
30 Caps Lock 3A BA 58 F0,58 14 F0,58 4C 39
31 A 1E 9E 1C F0,1C 1C F0,1C 4D 04
32 S 1F 9F 1B F0,1B 1B F0,1B 4E 16
33 D 20 A0 23 F0,23 23 F0,23 4F 07
34 F 21 A1 2B F0,2B 2B F0,2B 50 09
35 G 22 A2 34 F0,34 34 F0,34 51 0A
36 H 23 A3 33 F0,33 33 F0,33 52 0B
37 J 24 A4 3B F0,3B 3B F0,3B 53 0D
38 K 25 A5 42 F0,42 42 F0,42 54 0E
39 L 26 A6 4B F0,4B 4B F0,4B 55 0F
40 ; : 27 A7 4C F0,4C 4C F0,4C 56 33
41 ' " 28 A8 52 F0,52 52 F0,52 57 34
42 US-102 2B AB 61 F0,61 56 F0,56 7C 64
43 Return 1C 9C 5A F0,5A 5A F0,5A 59 28
44 Left Shift 2A AA 12 F0,12 12 F0,12 63 E1
46 Z 2C AC 1A F0,1A 1A F0,1A 64 1D
47 X 2D AD 22 F0,22 22 F0,22 65 2B
48 C 2E AE 21 F0,21 21 F0,21 66 06
49 V 2F AF 2A F0,2A 2A F0,2A 67 19
50 B 30 B0 32 F0,32 32 F0,32 68 05
51 N 31 B1 31 F0,31 31 F0,31 69 11
52 M 32 B2 3A F0,3A 3A F0,3A 6A 10
53 , < 33 B3 41 F0,41 41 F0,41 6B 36
54 . > 34 B4 49 F0,49 49 F0,49 6C 37
55 / ? 35 B5 4A F0,4A 4A F0,4A 6D 38
57 Right Shift 36 B6 59 F0,59 59 F0,59 6E E5
58 Left Control 1D 9D 14 F0,14 11 F0,11 77 E0
60 Left Alt 38 B8 11 F0,11 19 F0,19 13 E2
61 Space 39 B9 29 F0,29 29 F0,29 79 2C
62 Right Alt E0,38 E0,B8 E0,11 E0,F0,11 39 F0,39 0D E6
64 Right Control E0,1D E0,9D E0,14 E0,F0,14 58 F0,58 E4
75 Insert E0,52 E0,D2 E0,70 E0,F0,70 67 F0,67 2C 49
76 Delete E0,53 E0,D3 E0,71 E0,F0,71 64 F0,64 42 4C
79 Left Arrow E0,4B E0,CB E0,6B E0,F0,6B 61 F0,61 18 50
80 Home E0,47 E0,CB E0,6C E0,F0,6C 6E F0,6E 34 4A
81 End E0,4F E0,CF E0,69 E0,F0,69 65 F0,65 4A 4D
83 Up Arrow E0,48 E0,C8 E0,75 E0,F0,75 63 F0,63 14 52
84 Down Arrow E0,50 E0,D0 E0,72 E0,F0,72 60 F0,60 1B 51
85 Page Up E0,49 E0,C9 E0,7D E0,F0,7D 6F F0,6F 60 4B
86 Page Down E0,51 E0,D1 E0,7A E0,F0,7A 6D F0,6D 7B 4E
89 Right Arrow E0,4D E0,CD E0,74 E0,F0,74 6A F0,6A 1C 4F
90 Num Lock 45 C5 77 F0,77 76 F0,76 20 53
91 KP 7 47 C7 6C F0,6C 6C F0,6C 44 5F
92 KP 4 4B CB 6B F0,6B 6B F0,6B 5B 5C
93 KP 1 4F CF 69 F0,69 69 F0,69 70 59
95 KP / E0,35 E0,B5 E0,4A E0,F0,4A 77 F0,77 38 54
96 KP 8 48 C8 75 F0,75 75 F0,75 45 60
97 KP 5 4C CC 73 F0,73 73 F0,73 5C 5D
98 KP 2 50 D0 72 F0,72 72 F0,72 71 5A
99 KP 0 52 D2 70 F0,70 70 F0,70 5E 62
100 KP * 37 B7 7C F0,7C 7E F0,7C 2F 55
101 KP 9 49 C9 7D F0,7D 7D F0,7D 46 61
102 KP 6 4D CD 74 F0,74 74 F0,74 5D 5E
103 KP 3 51 D1 7A F0,7A 7A F0,7A 72 5B
104 KP . 53 D3 71 F0,71 71 F0,71 32 63
105 KP - 4A CA 7B F0,7B 7B F0,7B 47 56
106 KP + 4E CE 79 F0,79 7C F0,7C 7D 57
108 KP Enter E0,1C E0,9C E0,5A E0,F0,5A 79 F0,79 5A 58
110 Escape 01 81 76 F0,76 08 F0,08 1D 29
112 F1 3B BB 05 F0,05 07 F0,07 05 3A
113 F2 3C BC 06 F0,06 0F F0,0F 06 3B
114 F3 3D BD 04 F0,04 17 F0,17 08 3C
115 F4 3E BE 0C F0,0C 1F F0,1F 0A 3D
116 F5 3F BF 03 F0,03 27 F0,27 0C 3E
117 F6 40 C0 0B F0,0B 2F F0,2F 0E 3F
118 F7 41 C1 83 F0,83 37 F0,37 10 40
119 F8 42 C2 0A F0,0A 3F F0,3F 11 41
120 F9 43 C3 01 F0,01 47 F0,47 12 42
121 F10 44 C4 09 F0,09 4F F0,4F 07 43
122 F11 57 D7 78 F0,78 56 F0,56 09 44
123 F12 58 D8 07 F0,07 5E F0,5E 0B 45
124 Print Screen E0,37 E0,B7 E0,12,
E0,7C
E0,F0,7C,
E0,F0,12
57 F0,57 16 46
125 Scroll Lock 46 C6 7E F0,7E 5F F0,5F 17 97 47
126 Pause E1,1D,45,
E1,9D,C5
E1,14,77,
E1,F0,14,
F0,77
62 15 95 48
Alt+SysRq 54 D4 84 F0,84 57 F0,57
Ctrl+Break E0,46 E0,C6 E0,7E E0,F0,7E
Left Meta E0,5B E0,DB E0,1F E0,F0,1F 8B F0,8B 78 E3
Right Meta E0,5C E0,DC E0,27 E0,F0,27 8C F0,8C 7A E7
Menu E0,5D E0,DD E0,2F E0,F0,2F 8D F0,8D 43 65

Keys not on “standard layout”

Multimedia keys

Multimedia and other extra buttons can differ greatly between models. This table uses Microsoft’s standard, which is is arguably the most common for modern PS/2 keyboards. See Andries Brouwer’s page on multimedia keyboards for more information.

IBM
Key №
Keycap Set 1 Set 2 Set 3 Sun Type 5 USB
HID
Make Break Make Break Make Break Make Break
Power E0,5E E0,DE E0,37 E0,F0,37 30 66
Sleep E0,5F E0,DF E0,3F E0,F0,3F 54 F0,54 F8
Wake E0,63 E0,E3 E0,5E E0,F0,5E
Volume Up E0,30 E0,B0 E0,33 E0,F0,33 04 ED
Volume Down E0,2E E0,AE E0,21 E0,F0,21 02 EE
Mute E0,20 E0,A0 E0,23 E0,F0,23 2D EF
Play/Pause E0,22 E0,A2 E0,34 E0,F0,34 E8
Stop E0,24 E0,A4 E0,3B E0,F0,3B E9
Next E0,19 E0,99 E0,4D E0,F0,4D EB
Previous E0,10 E0,90 E0,15 E0,F0,13 EA

Function keys

The most common scheme for F13–F24 is as follows, based off IBM 122-key keyboards.

IBM
Key №
Keycap Set 1 Set 2 Set 3 Sun Type 5 USB
HID
Make Break Make Break Make Break Make Break
F13 5B DB 1F F0,1F 08 F0,08 68
F14 5C DC 27 F0,27 10 F0,10 69
F15 5D DD 2F F0,2F 18 F0,18 6A
F16 63 E3 5E F0,5E 20 F0,20 6B
F17 64 E4 08 F0,08 28 F0,28 6C
F18 65 E5 10 F0,10 30 F0,30 6D
F19 66 E6 18 F0,18 38 F0,38 6E
F20 67 E7 20 F0,20 40 F0,40 6F
F21 68 E8 28 F0,28 48 F0,48 70
F22 69 E9 30 F0,30 50 F0,50 71
F23 6A EA 38 F0,38 57 F0,57 72
F24 6B EB 40 F0,40 5F F0,5F 73

Sun “Fun Cluster”

Set 1–3 scancodes are inferred from the Microsoft multimedia key chart, i.e. Sun “Again” is mapped to Microsoft “Redo”.

IBM
Key №
Keycap Set 1 Set 2 Set 3 Sun Type 5 USB
HID
Make Break Make Break Make Break Make Break
Help E0,3B 76 75
Stop E0,68 01 78
Props 19 76
Front 31 77
Open E0,3F 48 74
Find E0,65 5F 7E
Again E0,07 93 79
Undo E0,08 1A 7A
Copy E0,18 33 7C
Paste E0,0A 49 7D
Cut E0,17 61 7B

CJK input

IBM
Key №
Keycap Set 1 Set 2 Set 3 USB
HID
Make Break Make Break Make Break
カタカナ/ひらがな
Katakana/Hiragana
70 88
変換
Henkan
79 8A
無変換
Muhenkan
7B 8B
한/영
Han/Yeong
90
漢字
Hanja
91