Keyboard Codes
KEYBOARD CODES
This appendix lists the keyboard codes that are returned by the
computer system when a key or key combination is pressed.
The column headings AH and AL refer to the hi and lo registers within
the AX register.
These are the actual values returned by the BIOS interrupt 16H in
assemlby language.
Key Key
Pressed AH AL Pressed AH AL
--------- ----- ----- --------- ----- -----
(space) 57 32 < 51 60
! 2 33 = 13 61
" 40 34 > 52 62
# 4 35 ? 53 63
$ 5 36 @ 3 64
% 6 37 A 30 65
& 8 38 B 48 66
' 40 39 C 46 67
( 10 40 D 32 68
) 11 41 E 18 69
* 9 42 F 33 70
+ 13 43 G 34 71
, 51 44 H 35 72
- 12 45 I 23 73
. 52 46 J 36 74
/ 53 47 K 37 75
0 11 48 L 38 76
1 2 49 M 50 77
2 3 50 N 49 78
3 4 51 O 24 79
4 5 52 P 25 80
5 6 53 Q 16 81
6 7 54 R 19 82
7 8 55 S 31 83
8 9 56 T 20 84
9 10 57 U 22 85
: 39 58 V 47 86
; 39 59 W 17 87
Key Key
Pressed AH AL Pressed AH AL
--------- ----- ----- --------- ----- -----
X 48 88 Ctrl-2 3 0
Y 21 89 BackSp 14 8
Z 44 90 Tab 15 9
[ 26 91 Ctrl-Enter 28 10
\ 43 92 Enter 28 13
] 27 93 Shft-Tab 15 0
^ 7 94 Alt-Q 16 0
_ 12 95 Alt-W 17 0
` 41 96 Alt-E 18 0
a 30 97 Alt-R 19 0
b 48 98 Alt-T 20 0
c 46 99 Alt-Y 21 0
d 32 100 Alt-U 22 0
e 18 101 Alt-I 23 0
f 33 102 Alt-O 24 0
g 34 103 Alt-P 25 0
h 35 104 Esc 1 27
i 23 105 Alt-A 30 0
j 36 106 Alt-S 31 0
k 37 107 Alt-D 32 0
l 38 108 Alt-F 33 0
m 50 109 Alt-G 34 0
n 49 110 Alt-H 35 0
o 24 111 Alt-J 36 0
p 25 112 Alt-K 37 0
q 16 113 Alt-L 38 0
r 19 114 Alt-Z 44 0
s 31 115 Alt-X 45 0
t 20 116 Alt-C 46 0
u 22 117 Alt-V 47 0
v 47 118 Alt-B 48 0
w 17 119 Alt-N 49 0
x 48 120 Alt-M 50 0
y 21 121 F1 59 0
z 44 122 F2 60 0
{ 26 123 F3 61 0
| 43 124 F4 62 0
} 27 125 F5 63 0
~ 41 126 F6 64 0
Key Key
Pressed AH AL Pressed AH AL
--------- ----- ----- --------- ----- -----
F7 65 0 Alt-F6 109 0
F8 66 0 Alt-F7 110 0
F9 67 0 Alt-F8 111 0
F10 68 0 Alt-F9 112 0
Home 71 0 Alt-F10 113 0
UArr 72 0 Ctrl-LArr 115 0
PgUp 73 0 Ctrl-RArr 116 0
LArr 75 0 Ctrl-End 117 0
RArr 77 0 Ctrl-PgDn 118 0
End 79 0 Ctrl-Home 119 0
DArr 80 0 Alt-1 120 0
PgDn 81 0 Alt-2 121 0
Ins 82 0 Alt-3 122 0
Del 83 0 Alt-4 123 0
Shft-F1 84 0 Alt-5 124 0
Shft-F2 85 0 Alt-6 125 0
Shft-F3 86 0 Alt-7 126 0
Shft-F4 87 0 Alt-8 127 0
Shft-F5 88 0 Alt-9 128 0
Shft-F6 89 0 Alt-0 129 0
Shft-F7 90 0 Alt-- 130 0
Shft-F8 91 0 Alt-= 131 0
Shft-F9 92 0 Ctrl-PgUp 132 0
Shft-F10 93 0 Ctrl-A 30 1
Ctrl-F1 94 0 Ctrl-B 48 2
Ctrl-F2 95 0 Ctrl-C 46 3
Ctrl-F3 96 0 Ctrl-D 32 4
Ctrl-F4 97 0 Ctrl-E 18 5
Ctrl-F5 98 0 Ctrl-F 33 6
Ctrl-F6 99 0 Ctrl-G 34 7
Ctrl-F7 100 0 Ctrl-H 35 8
Ctrl-F8 101 0 Ctrl-I 23 9
Ctrl-F9 102 0 Ctrl-J 36 10
Ctrl-F10 103 0 Ctrl-K 37 11
Alt-F1 104 0 Ctrl-L 38 12
Alt-F2 105 0 Ctrl-M 50 13
Alt-F3 106 0 Ctrl-N 49 14
Alt-F4 107 0 Ctrl-O 24 15
Alt-F5 108 0 Ctrl-P 25 16
Key
Pressed AH AL
--------- ----- -----
Ctrl-Q 16 17
Ctrl-R 19 18
Ctrl-S 31 19
Ctrl-T 20 20
Ctrl-U 22 21
Ctrl-V 47 22
Ctrl-W 17 23
Ctrl-X 45 24
Ctrl-Y 21 25
Ctrl-Z 44 26
Ctrl-[ 26 27
Ctrl-\ 43 28
Ctrl-] 27 29
Ctrl-6 7 30
Ctrl-- 12 31
Ctrl-BS 14 127
Ctrl-Break 0 0
Comments
Post a Comment