2025-12-02 ATARI keycodes plyr0 COMPUTE!'s THIRD BOOK OF ATARI Reading the Keybard codes by Orson Scott Card [1] KEY ESC 1 2 3 4 5 6 7 8 9 0 < > DEL KOD 28 31 30 26 24 29 27 51 53 48 50 54 55 52 SHF 92 95 94 90 88 93 91 115 117 112 114 118 119 116 CTL 156 159 158 154 152 157 155 179 181 176 178 182 183 180 S+C 220 223 222 218 216 221 219 243 245 240 242 246 247 244 KEY TAB Q W E R T Y U I O P - = RETURN KOD 44 47 46 42 40 45 43 11 13 8 10 14 15 12 SHF 108 111 110 106 104 109 107 75 77 72 74 78 79 76 CTL 172 175 174 170 168 173 171 139 141 136 138 142 143 140 S+C 236 239 238 234 232 237 235 203 205 200 202 206 207 204 KEY A S D F G H J K L ; + * CAPS KOD 63 62 58 56 61 57 1 5 0 2 6 7 60 SHF 127 126 122 120 125 121 65 69 64 66 70 71 124 CTL 191 190 186 184 189 185 129 133 128 130 134 135 188 S+C 255 254 250 248 253 249 - - - - - - 252 KEY Z X C V B N M , . / ATARI LOGO KOD 23 22 18 16 21 35 37 32 34 38 39 SHF 87 86 82 80 85 99 101 96 98 102 103 CTL 151 150 146 144 149 163 165 160 162 166 167 S+C - - - - - 227 229 224 226 230 231 KEY SPC F1 F2 F3 F4 HELP KOD 33 3 4 19 20 17 SHF 97 67 68 83 84 81 CTL 161 131 132 147 148 145 S+C - - - - - - Ordered by keycode: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | --+----+ ---+----+----+----+----+----+----| 0| L | J | ; | F1 | F2 | K | + | * | 8| O | | P | U |RTRN| I | - | = | 16| V |HELP| C | F3 | F4 | B | X | Z | 24| 4 | | 3 | 6 |ESC | 5 | 2 | 1 | 32| , |SPAC| . | N | | M | / |LOGO| 40| R | | E | Y |TAB | T | W | Q | 48| 9 | | 0 | 7 |DEL | 8 | < | > | 56| F | H | D | |CAPS| G | S | A | SHIFT CODE = KEYCODE + 64 CONTROL CODE = KEYCODE + 128 SHIFT + CONTROL CODE = KEYCODE + 192(mostly) Atari XL Keyboard Matrix Fox-1 1999 DEL > < 0 9 8 7 BRK | 1 ESC 1 2 3 4 5 6 | 2 RET = - P O I U | 3 TAB Q W E R T Y | 4 F2 * + ; L K J F1 CTRL | 5 CAP A S D F G H | 6 LOG ? . , M SPC N | 7 F4 Z X C V B HLP F3 SHIFT | 8 ------------------------------------------+---- 17 16 15 14 13 12 11 10 9 |LINES 23 RESET -\ 22 OPTION -+ 21 SELECT -+ 20 START -+ 18---------+----LED 19 +5V TODO: XE [2][3] PEEK KBCODE 53769($D209) shadow 764 ATASCII 763 bit 6 (+64) == Shift bit 7 (+128) == Control shift lock 702 0 = CAPS/LOWR 64 = SHIFT and CAPS/LOWR are pressed together 128 = CONTROL and CAPS/LOWR are pressed together OS ignores all SHIFT-CONTROL and CONTROL+number key combinations. " Atari 800XL and other XL models allow you to define your own Keycode Definitions array, informing the OS by POKEing the address of the table, low byte first, into locations 121 and 122 ($79 and $7A). The table is set up exactly like the ATASCII array—you could use the DATA statements, converting them from ICODE to ATASCII order, to set up the table for the XL redefinition. Missing SHIFT-CONTROL combinations: no value in location 53769 if both SHIFT and CONTROL are pressed at the same time: J, K, L, ;, +, *, Z, X, C, V, and B on all Ataris, and F1, F2, F3, F4 and HELP on XL models. " --- [1] https://www.atariarchives.org/c3ba/page004.php [2] https://ftp.pigwa.net/projects/aki/debounce/ [3] https://www.atari.org.pl/forum/viewtopic.php?id=7837