INF: Scan Codes for IBM and Compatible Keyboards

ID Number: Q37617

4.00 5.00 5.10 6.00 6.00a 6.00ax 7.00 | 5.10 6.00 6.00a

MS-DOS | OS/2

Summary:

Below are the scan codes for IBM and compatible keyboards. All scan

codes are in hexadecimal. See the "IBM PC Technical Reference" for

more details.

----------------------------------------------------------------------

83 key (PC,PC/XT) | 84 key (PC/AT) | 101/102 key (PC/AT PS/2)

----------------------------------------------------------------------

Key Scan Code | Key Scan Code | Key Scan Code

----------------------------------------------------------------------

ESC 01 KP ESC 01 ESC 01

1 02 1 02 1 02

2 03 2 03 2 03

3 04 3 04 3 04

4 05 4 05 4 05

5 06 5 06 5 06

6 07 6 07 6 07

7 08 7 08 7 08

8 09 8 09 8 09

9 0A 9 0A 9 0A

0 0B 0 0B 0 0B

- 0C - 0C - 0C

= 0D = 0D = 0D

BACKSPACE 0E BACKSPACE 0E BACKSPACE 0E

TAB 0F TAB 0F TAB 0F

Q 10 Q 10 Q 10

W 11 W 11 W 11

E 12 E 12 E 12

R 13 R 13 R 13

T 14 T 14 T 14

Y 15 Y 15 Y 15

U 16 U 16 U 16

I 17 I 17 I 17

O 18 O 18 O 18

P 19 P 19 P 19

[ 1A [ 1A [ 1A

] 1B ] 1B ] 1B

RETURN 1C RETURN 1C RETURN 1C

CTRL 1D CTRL 1D L CTRL 1D

A 1E A 1E A 1E

S 1F S 1F S 1F

D 20 D 20 D 20

F 21 F 21 F 21

G 22 G 22 G 22

H 23 H 23 H 23

J 24 J 24 J 24

K 25 K 25 K 25

L 26 L 26 L 26

; 27 ; 27 ; 27

' 28 ' 28 ' 28

` 29 ESC 29 ` 29

L SHIFT 2A L SHIFT 2A L SHIFT 2A

Z 2C Z 2C Z 2C

X 2D X 2D X 2D

C 2E C 2E C 2E

V 2F V 2F V 2F

B 30 B 30 B 30

N 31 N 31 N 31

M 32 M 32 M 32

, 33 , 33 , 33

. 34 . 34 . 34

/ 35 / 35 / 35

R SHIFT 36 R SHIFT 36 R SHIFT 36

PRT SCR 37 PRT SCR 37 KP * 37

ALT 38 ALT 38 ALT 38

Space 39 Space 39 Space 39

CAPS LOCK 3A CAPS LOCK 3A CAPS LOCK 3A

F1 3B F1 3B F1 3B

F2 3C F2 3C F2 3C

F3 3D F3 3D F3 3D

F4 3E F4 3E F4 3E

F5 3F F5 3F F5 3F

F6 40 F6 40 F6 40

F7 41 F7 41 F7 41

F8 42 F8 42 F8 42

F9 43 F9 43 F9 43

F10 44 F10 44 F10 44

NUM LOCK 45 NUM LOCK 45 NUM LOCK 45

SCROLL LOCK 46 SCROLL LOCK 46 SCROLL LOCK 46

KP 7 47 KP 7 47 KP 7 47

KP 8 48 KP 8 48 KP 8 48

KP 9 49 KP 9 49 KP 9 49

KP - 4A KP - 4A KP - 4A

KP 4 4B KP 4 4B KP 4 4B

KP 5 4C KP 5 4C KP 5 4C

KP 6 4D KP 6 4D KP 6 4D

KP + 4E KP + 4E KP + 4E

KP 1 4F KP 1 4F KP 1 4F

KP 2 50 KP 2 50 KP 2 50

KP 3 51 KP 3 51 KP 3 51

KP 0 52 KP 0 52 KP 0 52

KP . 53 KP . 53 KP . 53

Sys Req 54 F11 57

F12 58

R CTRL E0 10

KP / E0 36

R ALT E0 38

HOME E0 47

UP ARROW E0 48

PAGE UP E0 49

LEFT ARROW E0 4B

RIGHT ARROW E0 4D

END E0 4F

DOWN ARROW E0 50

PAGE DOWN E0 51

INSERT E0 52

DELETE E0 53

KP ENTER E0 1C

PAUSE E1 10 45

PRINT SCR E0 2A E037

Source : Norton's Guide to the IBM PC and PS/2

Additional reference words: 5.10 6.00 6.00a 6.00ax 7.00