Skip to content
Tristan Hume edited this page Apr 23, 2012 · 2 revisions

#Key Codes ##Ordinal values of keystrokes returned by getch and getchar.

  0   (space) 32   @ 64   ` 96 Ctrl-A 1 ! 33 A 65 a 97 Ctrl-B 2 " 34 B 66 b 98 Ctrl-C 3 # 35 C 67 c 99 Ctrl-D 4 $ 36 D 68 d 100 Ctrl-E 5 % 37 E 69 e 101 Ctrl-F 6 & 38 F 70 f 102 Ctrl-G 7 ' 39 G 71 g 103 Ctrl-H / BS 8 ( 40 H 72 h 104 Ctrl-I / Tab 9 ) 41 I 73 i 105 Ctrl-J / Enter 10 * 42 J 74 j 106 Ctrl-K 11 + 43 K 75 k 107 Ctrl-L 12 , 44 L 76 l 108 Ctrl-M 13 - 45 M 77 m 109 Ctrl-N 14 . 46 N 78 n 110 Ctrl-O 15 / 47 O 79 o 111 Ctrl-P 16 0 48 P 80 p 112 Ctrl-Q 17 1 49 Q 81 q 113 Ctrl-R 18 2 50 R 82 r 114 Ctrl-S 19 3 51 S 83 s 115 Ctrl-T 20 4 52 T 84 t 116 Ctrl-U 21 5 53 U 85 u 117 Ctrl-V 22 6 54 V 86 v 118 Ctrl-W 23 7 55 W 87 w 119 Ctrl-X 24 8 56 X 88 x 120 Ctrl-Y 25 9 57 Y 89 y 121 Ctrl-Z 26 : 58 Z 90 z 122 Ctrl-[ / Esc 27 ; 59 [ 91 { 123 Ctrl-\ 28 < 60 \ 92 | 124 Ctrl-] 29 = 61 ] 93 } 125 Ctrl-^ 30 > 62 ^ 94 ~ 126 Ctrl-_ 31 ? 63 _ 95 Ctrl-BS 127   Alt-9 128   Alt-D 160   F6 192   Ctrl-F3 224 Alt-0 129 Alt-F 161 F7 193 Ctrl-F4 225 Alt-- 130 Alt-G 162 F8 194 Ctrl-F5 226 Alt-= 131 Alt-H 163 F9 195 Ctrl-F6 227 Ctrl-PgUp 132 Alt-J 164 F10 196 Ctrl-F7 228 F11 133 Alt-K 165   197 Ctrl-F8 229 F12 134 Alt-L 166   198 Ctrl-F9 230 Shift-F11 135   167 Home 199 Ctrl-F10 231 Shift-F12 136   168 Up Arrow 200 Alt-F1 232 Ctrl-F11 137   169 PgUp 201 Alt-F2 233 Ctrl-F12 138   170   202 Alt-F3 234 Alt-F11 139   171 Left Arrow 203 Alt-F4 235 Alt-F12 140 Alt-Z 172   204 Alt-F5 236 Ctrl-Up Arrow 141 Alt-X 173 Right Arrow 205 Alt-F6 237   142 Alt-C 174   206 Alt-F7 238 Back Tab 143 Alt-V 175 End 207 Alt-F8 239 Alt-Q 144 Alt-B 176 Down Arrow 208 Alt-F9 240 Ctrl-Down Arrow 145 Alt-N 177 PgDn 209 Alt-F10 241 Ctrl-Insert 146 Alt-M 178 Insert 210   242 Ctrl-Delete 147   179 Delete 211 Ctrl-Left Arrow 243 Alt-T 148   180 Shift-F1 212 Ctrl-Right Arrow 244 Alt-Y 149   181 Shift-F2 213 Ctrl-End 245 Alt-U 150   182 Shift-F3 214 Ctrl-PgDn 246 Alt-I 151   183 Shift-F4 215 Ctrl-Home 247 Alt-O 152   184 Shift-F5 216 Alt-1 248 Alt-P 153   185 Shift-F6 217 Alt-2 249   154   186 Shift-F7 218 Alt-3 250   155 F1 187 Shift-F8 219 Alt-4 251   156 F2 188 Shift-F9 220 Alt-5 252   157 F3 189 Shift-F10 221 Alt-6 253 Alt-A 158 F4 190 Ctrl-F1 222 Alt-7 254 Alt-S 159 F5 191 Ctrl-F2 223 Alt-8 225

##Ordinal values of characters that are set by Input.KeyDown.

Backspace 8   (space) 32   @ 64   ` 96 Tab 9 ! 33 A 65 a 97 Enter 10 ! 34 B 66 b 98 Escape 27 # 35 C 67 c 99   $ 36 D 68 d 100 F11 133 % 37 E 69 e 101 F12 134 & 38 F 70 f 102 Shift 180 ' 39 G 71 g 103 Control 181 ( 40 H 72 h 104 Alt 182 ) 41 I 73 i 105 Keypad 5 183 * 42 J 74 j 106 F1 187 + 43 K 75 k 107 F2 188 , 44 L 76 l 108 F3 189 - 45 M 77 m 109 F4 190 . 46 N 78 n 110 F5 191 / 47 O 79 o 111 F6 192 0 48 P 80 p 112 F7 193 1 49 Q 81 q 113 F8 194 2 50 R 82 r 114 F9 195 3 51 S 83 s 115 F10 196 4 52 T 84 t 116   5 53 U 85 u 117 Home 199 6 54 V 86 v 118 Up Arrow 200 7 55 W 87 w 119 PgUp 201 8 56 X 88 x 120 Left Arrow 203 9 57 Y 89 y 121 Right Arrow 205 : 58 Z 90 z 122 End 207 ; 59 [ 91 { 123 Down Arrow 208 < 60 \ 92 | 124 PgDn 209 = 61 ] 93 } 125 Insert 210 > 62 ^ 94 ~ 126 Delete 211 ? 63 _ 95  

Clone this wiki locally