Key mapping

In the following table you'll find the key functions, scancodes and key mappings for US and German keyboards.

Key US
Key German
Scancode
Function
Variable
Esc Esc 1 on_esc key_esc
F1 F1 59 on_f1 key_f1
F2 F2 60 on_f2 key_f2
F3 F3 61 on_f3 key_f3
F4 F4 62 on_f4 key_f4
F5 F5 63 on_f5 key_f5
F6 F6 64 on_f6 key_f6
F7 F7 65 on_f7 key_f7
F8 F8 66 on_f8 key_f8
F9 F9 67 on_f9 key_f9
F10 F10 68 on_f10 key_f10
F11 F11 87 on_f11 key_f11
F12 F12 88 on_f12 key_f12
Space Leertaste 57 on_space key_space
BkSp Lsch 14 on_bksp key_bksp
Tab Tab 15 on_tab key_tab
Enter Enter 28 on_enter key_enter
Shift left UmSch li 42 on_shiftl key_shiftl
Shift right UmSch re 54 on_shiftr key_shiftr
Shift UmSchlt -- -- key_shift
Ctrl Strg 29 on_ctrl key_ctrl
Alt Alt 56 on_alt key_alt
PrtSc Druck 55 -- --
Caps UmSchFest 58 on_caps key_caps
ScrollLock Rollen 70 on_scrlk key_scrlk
Pause Pause 69 on_pause key_pause
Ins Einfg 82 on_ins key_ins
Del Entf 83 on_del key_del
Home Pos1 71 on_home key_home
End Ende 79 on_end key_end
PgUp BildAuf 73 on_pgup key_pgup
PgDn BildAb 81 on_pgdn key_pgdn
CursorUp Auf 72 on_cuu key_cuu
CursorDown Ab 80 on_cud key_cud
CursorLeft Links 75 on_cul key_cul
CursorRight Rechts 77 on_cur key_cur
~ ` ^ 41 on_grave key_grave
1 1 2 on_1 key_1
2 2 3 on_2 key_2
3 3 4 on_3 key_3
4 4 5 on_4 key_4
5 5 6 on_5 key_5
6 6 7 on_6 key_6
7 7 8 on_7 key_7
8 8 9 on_8 key_8
9 9 10 on_9 key_9
0 0 11 on_0 key_0
_ - ? 12 on_minusc
on_sz
key_minusc
key_sz
+ = ` ' 13 on_equals key_equals
Q Q 16 on_q key_q
W W 17 on_w key_w
E E 18 on_e key_e
R R 19 on_r key_r
T T 20 on_t key_t
Y Z 21 on_z (!) key_z (!)
U U 22 on_u key_u
I I 23 on_i key_i
O O 24 on_o key_o
P P 25 on_p key_p
{ [ 26 on_brackl
on_ue
key_brackl
key_ue
} ] * + 27 on_brackr
on_plus
key_brackr
key_plus
| \   43 on_bksl key_bksl
A A 30 on_a key_a
S S 31 on_s key_s
D D 32 on_d key_d
F F 33 on_f key_f
G G 34 on_g key_g
H H 35 on_h key_h
J J 36 on_j key_j
K K 37 on_k key_k
L L 38 on_l key_l
: ; 39 on_semic
on_oe
key_semic
key_oe
" ' 40 on_apos
on_ae
key_apos
key_ae
Z Y 44 on_y (!) key_y (!)
X X 45 on_x key_x
C C 46 on_c key_c
V V 47 on_v key_v
B B 48 on_b key_b
N N 49 on_n key_n
M M 50 on_m key_m
< , ; , 51 on_comma key_comma
> . : . 52 on_period key_period
? / _ - 53 on_slash key_slash

Mouse left 280 on_mouse_left mouse_left
Mouse middle 282 on_mouse_middle mouse_middle
Mouse right 281 on_mouse_right mouse_right

1. Joystick Button 1 256 on_joy1 joy_1
1. Joystick Button 2 257 on_joy2 joy_2
1. Joystick Button 3 258 on_joy3 joy_3
1. Joystick Button 4 259 on_joy4 joy_4
1. Joystick Button 5 260 on_joy5 joy_5
1. Joystick Button 6 261 on_joy6 joy_6
1. Joystick Button 7 262 on_joy7 joy_7
1. Joystick Button 8 263 on_joy8 joy_8
1. Joystick Button 9 264 on_joy9 joy_9
1. Joystick Button 10 265 on_joy10 joy_10
1. Joystick Button 11 266 on_joy11 joy_11
1. Joystick Button 12 267 on_joy12 joy_12
2. Joystick Button 1 268 on_joy2_1 joy2_1
2. Joystick Button 2 269 on_joy2_2 joy2_2
2. Joystick Button 3 270 on_joy2_3 joy2_3
2. Joystick Button 4 271 on_joy2_4 joy2_4
2. Joystick Button 5 272 on_joy2_5 joy2_5
2. Joystick Button 6 273 on_joy2_6 joy2_6
2. Joystick Button 7 274 on_joy2_7 joy2_7
2. Joystick Button 8 275 on_joy2_8 joy2_8
2. Joystick Button 9 276 on_joy2_9 joy2_9
2. Joystick Button 10 277 on_joy2_10 joy2_10
2. Joystick Button 11 278 on_joy2_11 joy2_11
2. Joystick Button 12 279 on_joy2_12 joy2_12