# 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
# 1      key is shifted for this keysym
# 2      left shift
# 4      right shift
# 8      key can be shifted or not with this keysym
#
# 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 8 0
!RSHIFT 8 5
!VSHIFT RSHIFT

Return 6 5 0
Down 1 6 8
Right 0 7 8
Home 0 6 8
BackSpace 1 7 8
Delete 1 7 0
Tab 9 0 8
KP_Tab 9 0 8
ISO_Left_Tab 9 0 1
Escape 9 4 8
Control_L 9 4 8
Find 0 6 0
Shift_L 8 0 2
Shift_R 8 5 4
a 4 0 0
b 6 2 0
c 6 1 0
d 4 1 0
e 2 1 0
f 5 1 0
g 4 2 0
h 5 2 0
i 3 3 0
j 4 3 0
k 5 3 0
l 4 4 0
m 6 3 0
n 7 2 0
o 2 4 0
p 3 4 0
q 2 0 0
r 3 1 0
s 5 0 0
t 2 2 0
u 2 3 0
v 7 1 0
w 3 0 0
x 7 0 0
y 3 2 0
z 6 0 0
#
# Joystick 1
#
KP_0 -1 0
KP_1 -1 1
KP_2 -1 2
KP_3 -1 3
KP_4 -1 4
KP_5 -1 5
KP_6 -1 6
KP_7 -1 7
KP_8 -1 8
KP_9 -1 9
#
# or keyboard - if joystick disabled
#
KP_0 8 6 8
KP_1 6 6 8
KP_2 7 6 8
KP_3 6 7 8
KP_4 4 6 8
KP_5 5 6 8
KP_6 4 7 8
KP_7 2 6 8
KP_8 3 6 8
KP_9 2 7 8
KP_Separator 7 3 8
KP_Multiply 5 7 8
KP_Divide 3 7 8
KP_Add 7 7 8
KP_Subtract 8 7 8
KP_Enter 6 5 8
KP_Decimal 9 6 8
0 8 6 0
1 6 6 0
2 7 6 0
3 6 7 0
4 4 6 0
5 5 6 0
6 4 7 0
7 2 6 0
8 3 6 0
9 2 7 0
slash 3 7 0
bracketright 8 2 0
bracketleft 9 1 0
parenright 1 4 0
parenleft 0 4 0
question 7 4 0
dollar 1 1 0
asterisk 5 7 0
colon 5 4 0
comma 7 3 0
quotedbl 1 0 0
sterling 1 3 0
backslash 1 3 0
bar 1 3 0
numbersign 0 1 0
exclam 0 0 0
percent 0 2 0
plus 7 7 0
underscore 0 5 0
ampersand 0 3 0
semicolon 6 4 0
minus 8 7 0
equal 9 7 0
space 9 2 8
greater 8 4 0
less 9 3 0
period 9 6 0
at 8 1 0
asciicircum 2 5 0
asciitilde 2 5 0
apostrophe 1 2 0
Left 0 7 1
Up 1 6 1
Insert 1 7 1
Clear 0 6 1
grave 8 1 1
W 3 0 1
A 4 0 1
Z 6 0 1
S 5 0 1
E 2 1 1
R 3 1 1
D 4 1 1
C 6 1 1
F 5 1 1
T 2 2 1
X 7 0 1
Y 3 2 1
G 4 2 1
B 6 2 1
H 5 2 1
U 2 3 1
V 7 1 1
I 3 3 1
J 4 3 1
M 6 3 1
K 5 3 1
O 2 4 1
N 7 2 1
P 3 4 1
L 4 4 1
Q 2 0 1
