Extended ASCII Keystrokes
When INT 16H Fn 00H returns AL=0, then AH will contain an extended ASCII
keystroke as listed in these tables. When a DOS Character I/O function
returns a character of 00H, you should make a second call to obtain the
extended ASCII value.
╓─────────────╥───────────────────╥───────────────────╥──────────────────╖
║ Key Hex Dec ║ Key Hex Dec ║ Key Hex Dec ║ Key Hex Dec ║
╟─────────────╫───────────────────╫───────────────────╫──────────────────╢
║ F1 3b 59 ║ Shift-F1 54 84 ║ Ctrl-F1 5e 94 ║ Alt-F1 68 104 ║
║ F2 3c 60 ║ Shift-F2 55 85 ║ Ctrl-F2 5f 95 ║ Alt-F2 69 105 ║
║ F3 3d 61 ║ Shift-F3 56 86 ║ Ctrl-F3 60 96 ║ Alt-F3 6a 106 ║
║ F4 3e 62 ║ Shift-F4 57 87 ║ Ctrl-F4 61 97 ║ Alt-F4 6b 107 ║
║ F5 3f 63 ║ Shift-F5 58 88 ║ Ctrl-F5 62 98 ║ Alt-F5 6c 108 ║
║ F6 40 64 ║ Shift-F6 59 89 ║ Ctrl-F6 63 99 ║ Alt-F6 6d 109 ║
║ F7 41 65 ║ Shift-F7 5a 90 ║ Ctrl-F7 64 100 ║ Alt-F7 6e 110 ║
║ F8 42 66 ║ Shift-F8 5b 91 ║ Ctrl-F8 65 101 ║ Alt-F8 6f 111 ║
║ F9 43 67 ║ Shift-F9 5c 92 ║ Ctrl-F9 66 102 ║ Alt-F9 70 112 ║
║ F10 44 68 ║ Shift-F10 5d 93 ║ Ctrl-F10 67 103 ║ Alt-F10 71 113 ║
╙─────────────╨───────────────────╨───────────────────╨──────────────────╜
╓───────────────╥────────────────╥───────────────────╥───────────────────╖
║ Key Hex Dec║ Key Hex Dec ║ Key Hex Dec ║ Key Hex Dec ║
╟───────────────╫────────────────╫───────────────────╫───────────────────╢
║ Alt-A 1e 30 ║ Alt-P 19 25 ║ Alt-3 7a 122 ║ down ↓ 50 80 ║
║ Alt-B 30 48 ║ Alt-Q 10 16 ║ Alt-4 7b 123 ║ left ← 4b 75 ║
║ Alt-C 2e 46 ║ Alt-R 13 19 ║ Alt-5 7c 124 ║ right → 4d 77 ║
║ Alt-D 20 32 ║ Alt-S 1f 31 ║ Alt-6 7d 125 ║ up ↑ 48 72 ║
║ Alt-E 12 18 ║ Alt-T 14 20 ║ Alt-7 7e 126 ║ End 4f 79 ║
║ Alt-F 21 33 ║ Alt-U 16 22 ║ Alt-8 7f 127 ║ Home 47 71 ║
║ Alt-G 22 34 ║ Alt-V 2f 47 ║ Alt-9 80 128 ║ PgDn 51 81 ║
║ Alt-H 23 35 ║ Alt-W 11 17 ║ Alt-- 82 130 ║ PgUp 49 73 ║
║ Alt-I 17 23 ║ Alt-X 2d 45 ║ Alt-= 83 131 ║ ║
║ Alt-J 24 36 ║ Alt-Y 15 21 ║ ║ ^left 73 115 ║
║ Alt-K 25 37 ║ Alt-Z 2c 44 ║ NUL 03 3 ║ ^right 74 116 ║
║ Alt-L 26 38 ║ ║ Shift-Tab 0f 15 ║ ^End 75 117 ║
║ Alt-M 32 50 ║ Alt-0 81 129 ║ Ins 52 82 ║ ^Home 77 119 ║
║ Alt-N 31 49 ║ Alt-1 78 120 ║ Del 53 83 ║ ^PgDn 76 118 ║
║ Alt-O 18 24 ║ Alt-2 79 121 ║ ^PrtSc 72 114 ║ ^PgUp 84 132 ║
╙───────────────╨────────────────╨───────────────────╨───────────────────╜
╔═══════════════════════════════════════════════╗
║ 101-key Keyboard Extensions Supported by BIOS ║
╓─────────╨─────────╥───────────────────────╥─────────────╨──────────╖
║ Key Hex Dec ║ Key Hex Dec ║ Key Hex Dec ║
╟───────────────────╫───────────────────────╫────────────────────────╢
║ F11 85 133 ║ Alt-Bksp 0e 14 ║ Alt- K / a4 164 ║
║ F12 86 134 ║ Alt-Enter 1c 28 ║ Alt- K * 37 55 ║
║ Shft-F11 87 135 ║ Alt-Esc 01 1 ║ Alt- K - 4a 74 ║
║ Shft-F12 88 136 ║ Alt-Tab a5 165 ║ Alt- K + 4e 78 ║
║ Ctrl-F11 89 137 ║ Ctrl-Tab 94 148 ║ Alt- K Enter a6 166 ║
║ Ctrl-F12 8a 138 ║ ║ ║
║ Alt-F11 8b 139 ║ Alt-up ↑ 98 152 ║ Ctrl- K / 95 149 ║
║ Alt-F12 8c 140 ║ Alt-down ↓ a0 160 ║ Ctrl- K * 96 150 ║
║ Alt-[ 1a 26 ║ Alt-left ← 9b 155 ║ Ctrl- K - 8e 142 ║
║ Alt-] 1b 27 ║ Alt-right → 9d 157 ║ Ctrl- K + 90 144 ║
║ Alt-; 27 39 ║ ║ ║
║ Alt-' 28 40 ║ Alt-Delete a3 163 ║ Ctrl- K ↑ [8] 8d 141 ║
║ Alt-` 29 41 ║ Alt-End 9f 159 ║ Ctrl- K 5 [5] 8f 143 ║
║ Alt-\ 2b 43 ║ Alt-Home 97 151 ║ Ctrl- K ↓ [2] 91 145 ║
║ Alt-, 33 51 ║ Alt-Insert a2 162 ║ Ctrl- K Ins[0] 92 146 ║
║ Alt-. 34 52 ║ Alt-PageUp 99 153 ║ Ctrl- K Del[.] 93 147 ║
║ Alt-/ 35 53 ║ Alt-PageDown a1 161 ║ ║
╙───────────────────╨───────────────────────╨────────────────────────╜
K indicates a key on the numeric keypad▲ (when not in NumLock mode)
█▌Detecting the press and release of Alt▐█
The BIOS does not put the Alt key or other shift keys into the keyboard
buffer. If you want to take notice of the press (and release) of say,
Alt, you will need to either intercept INT 09H and read the raw scan
codes, or poll the byte at 0040:0017 regularly and watch for changes to
the keyboard shift-state flags.
See Also: Keyboard Scan Codes
Keyboard Flags
Character I/O Functions
INT 16H
-♦-