# 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)
# '!UNDEF keysym'        remove keysym from table
#
# Shiftflag can have the values:
# 0      key is not shifted for this keysym/scancode
# 1      key is shifted for this keysym/scancode
# 2      left shift
# 4      right shift
# 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
#
# Negative row values:
# 'keysym -1 n' joystick #1, direction n
# 'keysym -2 n' joystick #2, 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
#

!CLEAR
!LSHIFT 6 0
!RSHIFT 6 6
!VSHIFT RSHIFT

53 2 0 8         /*          ESC -> ESC          */
18 1 0 8         /*            1 -> 1            */
19 0 0 8         /*            2 -> 2            */
20 9 1 8         /*            3 -> 3            */
21 1 1 8         /*            4 -> 4            */
23 0 1 8         /*            5 -> 5            */
22 9 2 8         /*            6 -> 6            */
26 1 2 8         /*            7 -> 7            */
28 0 2 8         /*            8 -> 8            */
25 9 3 8         /*            9 -> 9            */
29 1 3 8         /*            0 -> 0            */
27 9 5 8         /*            - -> :            */
24 0 3 8         /*            = -> -            */
51 4 7 8         /*    Backspace -> Del          */

48 4 0 8         /*          Tab -> Tab          */
12 5 0 8         /*            Q -> Q            */
13 4 1 8         /*            W -> W            */
14 5 1 8         /*            E -> E            */
15 4 2 8         /*            R -> R            */
17 5 2 8         /*            T -> T            */
16 4 3 8         /*            Y -> Y            */
32 5 3 8         /*            U -> U            */
34 4 5 8         /*            I -> I            */
31 5 5 8         /*            O -> O            */
35 4 6 8         /*            P -> P            */
33 5 6 8         /*            [ -> [            */
30 2 4 8         /*            ] -> ]            */
36 3 4 8         /*       Return -> Return       */
59 8 0 8         /*    Left Ctrl -> RVS          */

0 3 0 8          /*            A -> A            */
1 2 1 8          /*            S -> S            */
2 3 1 8          /*            D -> D            */
3 2 2 8          /*            F -> F            */
5 3 2 8          /*            G -> G            */
4 2 3 8          /*            H -> H            */
38 3 3 8         /*            J -> J            */
40 2 5 8         /*            K -> K            */
37 3 5 8         /*            L -> L            */
41 2 6 8         /*            ; -> ;            */
39 3 6 8         /*            ' -> @            */
10 9 0 8         /*            ` -> Left Arrow   */
56 6 0 2         /*   Left Shift -> Left Shift   */

42 4 4 8         /*            \ -> \            */
6 7 0 8          /*            Z -> Z            */
7 8 1 8          /*            X -> X            */
8 6 1 8          /*            C -> C            */
9 7 1 8          /*            V -> V            */
11 6 2 8         /*            B -> B            */
45 7 2 8         /*            N -> N            */
46 8 3 8         /*            M -> M            */
43 7 3 8         /*            , -> ,            */
47 6 3 8         /*            . -> .            */
44 8 6 8         /*            / -> /            */

60 6 6 4         /*  Right Shift -> Right Shift  */
49 8 2 8         /*        Space -> Space        */
50 2 0 8         /*          < > -> ESC          */

#71 1 4 8        /*     Numpad 7 -> Numpad 7     */
#72 0 4 8        /*     Numpad 8 -> Numpad 8     */
#73 1 7 8        /*     Numpad 9 -> Numpad 9     */
##74 -1 -1 0     /*     Numpad - -> (no key)     */
#75 5 7 8        /*     Numpad 4 -> Numpad 4     */
#76 2 7 8        /*     Numpad 5 -> Numpad 5     */
#77 3 7 8        /*     Numpad 6 -> Numpad 6     */
#78 -1 -1 0      /*     Numpad + -> (no key)     */
#79 8 7 8        /*     Numpad 1 -> Numpad 1     */
#80 7 7 8        /*     Numpad 2 -> Numpad 2     */
#81 6 7 8        /*     Numpad 3 -> Numpad 3     */
#82 7 4 8        /*     Numpad 0 -> Numpad 0     */
#83 6 4 8        /*     Numpad . -> .            */

115 8 4 8        /*         Home -> CLR/HOME     */
126 5 4 1        /*           Up -> CRSR UP      */
#116 -1 -1 0     /*         PgUp -> (no key)     */
123 0 5 1        /*         Left -> CRSR LEFT    */
124 0 5 8        /*        Right -> CRSR RIGHT   */
125 5 4 8        /*         Down -> CRSR DOWN    */
#121 -1 -1 0     /*       PgDown -> (no key)     */

121 9 4 8        /*       PgDown -> STOP         */
116 1 5 8        /*          PgUp -> Up arrow     */

122 7 6 8        /*             F1 -> RPT          */
