Next: , Up: Input handling and screen management


2.1.1 Key names

The names of the keys are usually rather intuitive: 'a names the key A, "1" names the key 1, and so on. Note that, although usually the names can be given as symbols, in some cases the string representation is required, like in the case of digits, punctuation marks or brackets. Note also, that not all these characters will be accessible through the event subsystem in direct mode (it should depend on the keyboard layout): for instance, if exclamation mark is obtained by pressing shift and '1' (in typing mode), only the events related with pressing shift and '1' will be generated (in direct mode).

*SLAYER NAME* *ASCII VALUE* *COMMON NAME (SDL)*

"mouse-left" left mouse button
"mouse-right" right mouse button
"mouse-middle" middle mouse button
"mwheelup" mouse wheel up
"mwheeldown" mouse wheel down

"backspace" '\b' backspace
"tab" '\t' tab
"clear" clear
"return" '\r' return
"pause" pause
"esc" '^[' escape
"space" ' ' space
"!" '!' exclaim
"\"" '"' quotedbl
"#" '#' hash
"$" '$' dollar
"&" '&' ampersand
"'" ”' quote
"(" '(' left parenthesis
")" ')' right parenthesis
"*" '*' asterisk
"+" '+' plus sign
"-" '-' minus sign
"," ',' comma
"." '.' period
"/" '/' forward slash
"0" '0' 0
"1" '1' 1
"2" '2' 2
"3" '3' 3
"4" '4' 4
"5" '5' 5
"6" '6' 6
"7" '7' 7
"8" '8' 8
"9" '9' 9
":" ':' colon
";" ';' semicolon
"<" '<' less-than sign
"=" '=' equals sign
">" '>' greater-than sign
"?" '?' question mark
"@" '@' at
"[" '[' left bracket
"\\" '\' slash
"]" ']' right bracket
"^" '^' caret
"_" '_' underscore
"`" '`' grave
"a" 'a' a
"b" 'b' b
"c" 'c' c
"d" 'd' d
"e" 'e' e
"f" 'f' f
"g" 'g' g
"h" 'h' h
"i" 'i' i
"j" 'j' j
"k" 'k' k
"l" 'l' l
"m" 'm' m
"n" 'n' n
"o" 'o' o
"p" 'p' p
"q" 'q' q
"r" 'r' r
"s" 's' s
"t" 't' t
"u" 'u' u
"v" 'v' v
"w" 'w' w
"x" 'x' x
"y" 'y' y
"z" 'z' z
"delete" '^?' delete
"num0" keypad 0
"num1" keypad 1
"num2" keypad 2
"num3" keypad 3
"num4" keypad 4
"num5" keypad 5
"num6" keypad 6
"num7" keypad 7
"num8" keypad 8
"num9" keypad 9
"num." '.' keypad period
"num/" '/' keypad divide
"num*" '*' keypad multiply
"num-" '-' keypad minus
"num+" '+' keypad plus
"numret" '\r' keypad enter
"num=" '=' keypad equals
"up" up arrow
"down" down arrow
"left" left arrow
"right" right arrow
"ins" insert
"home" home
"end" end
"pgup" page up
"pgdown" page down
"f1" F1
"f2" F2
"f3" F3
"f4" F4
"f5" F5
"f6" F6
"f7" F7
"f8" F8
"f9" F9
"f10" F10
"f11" F11
"f12" F12
"f13" F13
"f14" F14
"f15" F15
"numlock" numlock
"caps" capslock
"scroll" scrollock
"lshift" left shift
"rshift" right shift
"lctrl" left ctrl
"rctrl" right ctrl
"lalt" left alt
"ralt" right alt
"lmeta" left meta
"rmeta" right meta
"lsuper" left windows key
"rsuper" right windows key
"mode" mode shift
"help" help
"print" print screen
"sysrq" SysRq
"break" break
"menu" menu
"power" power
"euro" euro