Under all Microsoft operating systems, all keyboards actually transmit Scan Code Set 2 values down the wire from the keyboard to the keyboard port. These values are translated to Scan Code Set 1 by the i8042 port chip. The rest of the operating system, and all applications that handle scan codes expect the values to be from Scan Code Set 1. Scan Code Set 3 is not used or required for operation of Microsoft operating systems. In the very early days of Windows NT®, an attempt was made to use the much more orthogonal Scan Code Set 3, but due to bugs in the implementation of this Scan Code Set on numerous OEM keyboards, the idea was abandoned
101/102 Enhanced Keyboard |
Scan Code 2 Make |
Scan Code 2 Break |
~ ` |
0E |
F0 0E |
! 1 |
16 |
F0 16 |
@ 2 |
1E |
F0 1E |
# 3 |
26 |
F0 26 |
$ 4 |
25 |
F0 25 |
% 5 |
2E |
F0 2E |
^ 6 |
36 |
F0 36 |
& 7 |
3D |
F0 3D |
* 8 |
3E |
F0 3E |
( 9 |
46 |
F0 46 |
) 0 |
45 |
F0 45 |
_ - |
4E |
F0 4E |
+ = |
55 |
F0 55 |
Backspace |
66 |
F0 66 |
Tab |
0D |
F0 0D |
Q |
15 |
F0 15 |
W |
1D |
F0 1D |
E |
24 |
F0 24 |
R |
2D |
F0 2D |
T |
2C |
F0 2C |
Y |
35 |
F0 35 |
U |
3C |
F0 3C |
I |
43 |
F0 43 |
O |
44 |
F0 44 |
P |
4D |
F0 4D |
{ [ |
54 |
F0 54 |
} ] |
5B |
F0 5B |
| \ |
5D |
F0 5D |
Caps Lock |
58 |
F0 58 |
A |
1C |
F0 1C |
S |
1B |
F0 1B |
D |
23 |
F0 23 |
F |
2B |
F0 2B |
G |
34 |
F0 34 |
H |
33 |
F0 33 |
J |
3B |
F0 3B |
K |
42 |
F0 42 |
L |
4B |
F0 4B |
: ; |
4C |
F0 4C |
" ‘ |
52 |
F0 52 |
Enter |
5A |
F0 5A |
L SHIFT |
12 |
F0 12 |
Z |
1A |
F0 1A |
X |
22 |
F0 22 |
C |
21 |
F0 21 |
V |
2A |
F0 2A |
B |
32 |
F0 32 |
N |
31 |
F0 31 |
M |
3A |
F0 3A |
< , |
41 |
F0 41 |
> . |
49 |
F0 49 |
? / |
4A |
F0 4A |
R SHIFT |
59 |
F0 59 |
L CTRL |
14 |
F0 14 |
L ALT |
11 |
F0 11 |
Space Bar |
29 |
F0 29 |
R ALT |
E0 11 |
E0 F0 11 |
R CTRL |
E0 14 |
E0 F0 14 |
Insert |
Note 2 |
Note 2 |
Delete |
Note 2 |
Note 2 |
L Arrow |
Note 2 |
Note 2 |
Home |
Note 2 |
Note 2 |
End |
Note 2 |
Note 2 |
Up Arrow |
Note 2 |
Note 2 |
Dn Arrow |
Note 2 |
Note 2 |
Page Up |
Note 2 |
Note 2 |
Page Down |
Note 2 |
Note 2 |
R Arrow |
Note 2 |
Note 2 |
Num Lock |
77 |
F0 77 |
Numeric 7 |
6C |
F0 6C |
Numeric 4 |
6B |
F0 6B |
Numeric 1 |
69 |
F0 69 |
Numeric / |
Note 3 |
Note 3 |
Numeric 8 |
75 |
F0 75 |
Numeric 5 |
73 |
F0 73 |
Numeric 2 |
72 |
F0 72 |
Numeric 0 |
70 |
F0 70 |
Numeric * |
7C |
F0 7C |
Numeric 9 |
7D |
F0 7D |
Numeric 6 |
74 |
F0 74 |
Numeric 3 |
7A |
F0 7A |
Numeric . |
71 |
F0 71 |
Numeric - |
7B |
F0 7B |
Numeric + |
79 |
F0 79 |
Numeric Enter |
E0 5A |
E0 F0 5A |
Esc |
76 |
F0 76 |
F1 |
05 |
F0 05 |
F2 |
06 |
F0 06 |
F3 |
04 |
F0 05 |
F4 |
0C |
F0 0C |
F5 |
03 |
F0 03 |
F6 |
0B |
F0 0B |
F7 |
83 |
F0 83 |
F8 |
0A |
F0 0A |
F9 |
01 |
F0 01 |
F10 |
09 |
F0 09 |
F11 |
78 |
F0 78 |
F12 |
07 |
F0 07 |
Print Screen |
Note 4 |
Note 4 |
Scroll Lock |
7E |
F0 7E |
Pause |
Note 5 |
Note 5 |
Left Win |
E0 1F |
E0 F0 1F |
Right Win |
E0 27 |
E0 F0 27 |
Application |
E0 2F |
E0 F0 2F |
ACPI Power |
E0 37 |
E0 F0 37 |
ACPI Sleep |
E0 3F |
E0 F0 3F |
ACPI Wake |
E0 5E |
E0 F0 5E |
Note 1 – Not Used
Note 2 for Scan Code 2:
These keys may have additional "shift" and/or "unshift" scan codes preceding the Base Make code and following the Base Break code, depending upon the current state of Num Lock and the state of SHIFT key/s (when multiple keys are held down at the same time).
US key assignment |
Base Make |
Base Break |
Insert |
E0 70 |
E0 F0 70 |
Delete |
E0 71 |
E0 F0 71 |
Left Arrow |
E0 6B |
E0 F0 6B |
Home |
E0 6C |
E0 F0 6C |
End |
E0 69 |
E0 F0 69 |
Up Arrow |
E0 75 |
E0 F0 75 |
Dn Arrow |
E0 72 |
E0 F0 72 |
Page Up |
E0 7D |
E0 F0 7D |
Page Down |
E0 7A |
E0 F0 7A |
Right Arrow |
E0 74 |
E0 F0 74 |
Num Lock ON |
Precede Base Make code with |
follow Base Break code with |
Final Key only |
E0 12 |
E0 F0 12 |
LSHIFT down + Final Key |
||
RSHIFT down + Final Key |
||
Both LSHIFT and RSHIFT down + Final Key |
Num Lock OFF |
Precede Base Make code with |
follow Base Break code with |
Final Key only |
||
LSHIFT down + Final Key |
E0 F0 12 |
E0 12 |
RSHIFT down + Final Key |
E0 F0 59 |
E0 59 |
Both LSHIFT and RSHIFT down + Final Key |
E0 F0 12 E0 F0 59 |
E0 59 E0 12 |
(Numeric / on US keyboards)
Scan Code |
base |
L-SHIFT + base |
R-SHIFT + base |
L-SHIFT + R-SHIFT + base |
2 make |
E0 4A |
E0 F0 12 E0 4A |
E0 F0 59 E0 4A |
E0 F0 12 E0 F0 59 E0 4A |
2 break |
E0 F0 4A |
E0 F0 4A E0 12 |
E0 F0 4A E0 59 |
E0 F0 4A E0 59 E0 12 |
(Print Screen on US keyboards)
Scan Code |
Make |
Break |
LCtrl or RCtrl + LSHIFT or RSHIFT + Make |
LCtrl or RCtrl + LSHIFT or RSHIFT + Break |
LAlt or RAlt + Make |
LAlt or RAlt + Break |
2 |
E0 12 E0 7C |
E0 F0 7C E0 F0 12 |
E0 7C |
E0 F0 7C |
84 |
F0 84 |
(Pause on US keyboards)
Scan Code |
Make |
L-Ctrl or R-Ctrl + Make |
2 |
E1 14 77 E1 F0 14 F0 77 |
E0 7E E0 F0 7E |