# VICE keyboard mapping file # # A Keyboard map is read in as patch to the current map. # # File format: # - comment lines start with '#' # - keyword lines start with '!keyword' # - normal line has 'keysym/scancode row column shiftflag' # # Keywords and their lines are: # '!CLEAR' clear whole table # '!INCLUDE filename' read file as mapping file # '!LSHIFT row col' left shift keyboard row/column # '!RSHIFT row col' right shift keyboard row/column # '!VSHIFT shiftkey' virtual shift key (RSHIFT or LSHIFT) # '!SHIFTL shiftkey' shift lock key (RSHIFT or LSHIFT) # '!LCTRL row col' left control keyboard row/column # '!VCTRL ctrlkey' virtual control key (LCTRL) # '!LCBM row col' left CBM keyboard row/column # '!VCBM cbmkey' virtual CBM key (LCBM) # '!UNDEF keysym' remove keysym from table # # Shiftflag can have the values: # 0 key is not shifted for this keysym/scancode # 1 key is combined with shift for this keysym/scancode # 2 key is left shift on emulated machine # 4 key is right shift on emulated machine # 8 key can be shifted or not with this keysym/scancode # 16 deshift key for this keysym/scancode # 32 another definition for this keysym/scancode follows # 64 key is shift-lock on emulated machine # 128 shift modifier required on host # 256 key is used for an alternative keyboard mapping # 512 alt-r (alt-gr) modifier required on host # 1024 ctrl modifier required on host # 2048 key is combined with cbm for this keysym/scancode # 4096 key is combined with ctrl for this keysym/scancode # 8192 key is (left) cbm on emulated machine # 16384 key is (left) ctrl on emulated machine # # to migrate older keymaps and use the CBM and/or CTRL related features: # # - define !LCTRL, !VCTRL, !LCBM, !VCBM # - add 'key is (left) cbm/ctrl on emulated machine' flags to # all keys that map to the cbm or ctrl key respectively. # # after that the virtual cbm/ctrl flags and requiring host modifiers # should work as expected. keep an eye on the error messages. # # Negative row values: # 'keysym -1 n' joystick keymap A, direction n # 'keysym -2 n' joystick keymap B, direction n # 'keysym -3 0' first RESTORE key # 'keysym -3 1' second RESTORE key # 'keysym -4 0' 40/80 column key # 'keysym -4 1' CAPS (ASCII/DIN) key # 'keysym -5 n' joyport keypad, key n # # Joystick direction values: # 0 Fire # 1 South/West # 2 South # 3 South/East # 4 West # 5 East # 6 North/West # 7 North # 8 North/East # # Joyport keypad key layout: # -------------------------- # | 0 | 1 | 2 | 3 | 4 | # -------------------------- # | 5 | 6 | 7 | 8 | 9 | # -------------------------- # | 10 | 11 | 12 | 13 | 14 | # -------------------------- # | 15 | 16 | 17 | 18 | 19 | # -------------------------- # # When a bigger spaced key is used, # it uses the upper left most key value. !CLEAR !LSHIFT 1 7 !RSHIFT 6 4 !VSHIFT RSHIFT !SHIFTL LSHIFT !LCTRL 7 2 !VCTRL LCTRL !LCBM 7 5 !VCBM LCBM ###ILJ### 27 7 7 8 49 7 0 8 50 7 3 32 50 5 6 144 51 1 0 8 52 1 3 8 53 2 0 8 54 2 3 32 54 6 6 144 55 3 0 32 55 2 3 129 56 3 3 32 56 6 1 144 57 4 0 32 57 3 3 129 48 4 3 32 48 4 0 129 45 5 3 32 45 5 6 2192 61 6 5 32 61 5 0 144 8 0 0 8 9 7 5 8192 113 7 6 8 119 1 1 8 101 1 6 8 114 2 1 8 116 2 6 8 121 3 1 8 117 3 6 8 105 4 1 8 111 4 6 8 112 5 1 8 91 5 5 1 93 6 2 1 13 0 1 8 306 7 2 16384 97 1 2 8 115 1 5 8 100 2 2 8 102 2 5 8 103 3 2 8 104 3 5 8 106 4 2 8 107 4 5 8 108 5 2 8 59 6 2 32 59 5 5 144 39 3 0 33 39 7 3 129 ###ILJ### 96 7 1 32 ###ILJ### 96 6 6 129 ###ILJ### 92 6 0 32 ###ILJ### 92 5 3 129 304 1 7 2 301 1 7 64 122 1 4 8 120 2 7 8 99 2 4 8 118 3 7 8 98 3 4 8 110 4 7 8 109 4 4 8 44 5 7 8 46 5 4 8 47 6 7 8 303 6 4 4 32 7 4 8 282 0 4 8 283 0 4 1 284 0 5 8 285 0 5 1 286 0 6 8 287 0 6 1 288 0 3 8 289 0 3 1 278 6 3 8 273 0 7 1 276 0 2 1 275 0 2 8 274 0 7 8 277 0 0 1 127 0 0 8 # # Restore key mappings # ###ILJ### 280 -3 0 # # joyport attached keypad key mapping # 300 -5 0 263 -5 1 264 -5 2 265 -5 3 302 -5 5 260 -5 6 261 -5 7 262 -5 8 317 -5 10 257 -5 11 258 -5 12 259 -5 13 316 -5 15 256 -5 16 266 -5 17 271 -5 18 ###ILJ### 270 -5 20 # # https://vice-emu.pokefinder.org/index.php/VICEKB # http://elbeaus.com/c64/C64kbd.html # https://sites.google.com/site/h2obsession/CBM/C128/keyboard-scan # 27 9 0 8 # esc = esc 92 -3 0 # \ = restore 96 7 7 8 # ` = run/stop