# 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
# 256    key is used for an alternative keyboard mapping
#
# 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 1 7
!RSHIFT 6 4
!VSHIFT RSHIFT

#braceleft 5 5 1
#braceright 6 2 1
#sterling 6 0 8
#macron 4 0 8
#notsign 4 0 8

#####################

# inst/del
BackSpace 0 0 8
# extra: delete -> ins/del
Delete 0 0 8
# extra: insert -> shift+ins/del
Insert 0 0 1

# return
Return 0 1 8
# cursor r/l
Right 0 2 8
Left 0 2 1

# f7
F7 0 3 8
F8 0 3 1
# extra: pagedown -> f7
Page_Down 0 3 8

# f1
F1 0 4 8
F2 0 4 1
# extra: pagedown -> f1
Page_Up 0 4 8

# f3
F3 0 5 8
F4 0 5 1
# f4
F5 0 6 8
F6 0 6 1
# cursor u/d
Up 0 7 1
Down 0 7 8

#####################

# shift+3
section 1 0 8
numbersign 1 0 1
# shift+4
dollar 1 3 8
# left shift
Shift_L 1 7 2

#####################

# shift+5
percent 2 0 8
# shift+6
ampersand 2 3 8

#####################

# shift+7
#slash 3 0 8
apostrophe 3 0 1
# shift+8
parenleft 3 3 8

#####################

# shift+9
parenright 4 0 8
# shift+0
#equal 4 3 8
#####################

# plus
plus 5 0 0
#ssharp 5 0 8
#question 5 0 8

# minus
#apostrophe 5 3 8
minus 5 3 0
grave 5 3 8

# dot
period 5 4 8
#colon 5 4 1
greater 5 4 1

# colon
colon 5 5 0
#odiaeresis 5 5 8
Odiaeresis 5 5 1
# extra: altgr+[ -> :+shift
bracketleft 5 5 1

# @-key
udiaeresis 5 6 8
Udiaeresis 5 6 1
at 5 6 0

# comma
comma 5 7 8
#semicolon 5 7 1
less 5 7 1

#####################

# pound
#less 6 0 8
#greater 6 0 1
bar 6 0 8
brokenbar 6 0 8

# *
#plus 6 1 8
asterisk 6 1 16

# semi-colon
semicolon 6 2 0
#adiaeresis 6 2 8
Adiaeresis 6 2 1
# extra: altgr+] -> ;+shift
bracketright 6 2 1

# clr/home
Home 6 3 8
# extra: altgr+\ -> clr/home
backslash 6 3 8

# right shift
Shift_R 6 4 4

# =
#numbersign 6 5 8
equal 6 5 16

# arrow up / pi

asciicircum 6 6 8
degree 6 6 8

# extra: End -> arrow up
End 6 6 8
# extra: altgr+~ -> arrow up
asciitilde 6 6 8
# extra: altgr+m -> arrow up+shift (pi)
mu 6 6 1

# / ?
slash 6 7 16
#minus 6 7 8
question 6 7 8
#underscore 6 7 1

#####################

# shift+1
exclam 7 0 8
# left arrow
underscore 7 1 8
#asciicircum 7 1 8
#degree 7 1 8
# ctrl
Tab 7 2 8
ISO_Left_Tab 7 2 8
# shift+2
quotedbl 7 3 8
# space
space 7 4 8
# cbm
Control_L 7 5 8
# run/stop
Escape 7 7 8

#####################


0 4 3 8
1 7 0 8
2 7 3 8
3 1 0 8
4 1 3 8
5 2 0 8
6 2 3 8
7 3 0 0
8 3 3 8
9 4 0 8

A 1 2 8
B 3 4 8
C 2 4 8
D 2 2 8
E 1 6 8
F 2 5 8
G 3 2 8
H 3 5 8
I 4 1 8
J 4 2 8
K 4 5 8
L 5 2 8
M 4 4 8
N 4 7 8
O 4 6 8
P 5 1 8
Q 7 6 8
R 2 1 8
S 1 5 8
T 2 6 8
U 3 6 8
V 3 7 8
W 1 1 8
X 2 7 8
Y 3 1 8
Z 1 4 8
a 1 2 8
b 3 4 8
c 2 4 8
d 2 2 8
e 1 6 8
f 2 5 8
g 3 2 8
h 3 5 8
i 4 1 8
j 4 2 8
k 4 5 8
l 5 2 8
m 4 4 8
n 4 7 8
o 4 6 8
p 5 1 8
q 7 6 8
r 2 1 8
s 1 5 8
t 2 6 8
u 3 6 8
v 3 7 8
w 1 1 8
x 2 7 8
y 3 1 8
z 1 4 8

#
# Restore key mappings
#
F12 -3 0
F12 -3 1
