Cerberus X Documentation

Key codes

The following constants are for use with KeyDown and KeyHit:

KEY_BACKSPACE
KEY_TAB
KEY_ENTER
KEY_ESCAPE
KEY_SPACE
KEY_SHIFT
KEY_CONTROL
KEY_PAGEUP
KEY_PAGEDOWN
KEY_END
KEY_HOME
KEY_LEFT
KEY_UP
KEY_RIGHT
KEY_DOWN
KEY_INSERT
KEY_DELETE
KEY_F1
KEY_F2
KEY_F3
KEY_F4
KEY_F5
KEY_F6
KEY_F7
KEY_F8
KEY_F9
KEY_F10
KEY_F11
KEY_F12
KEY_0
KEY_1
KEY_2
KEY_3
KEY_4
KEY_5
KEY_6
KEY_7
KEY_8
KEY_9
KEY_A
KEY_B
KEY_C
KEY_D
KEY_E
KEY_F
KEY_G
KEY_H
KEY_I
KEY_J
KEY_K
KEY_L
KEY_M
KEY_N
KEY_O
KEY_P
KEY_Q
KEY_R
KEY_S
KEY_T
KEY_U
KEY_V
KEY_W
KEY_X
KEY_Y
KEY_Z
KEY_TILDE
KEY_MINUS
KEY_EQUALS
KEY_OPENBRACKET
KEY_CLOSEBRACKET
KEY_BACKSLASH
KEY_SEMICOLON
KEY_QUOTES
KEY_COMMA
KEY_PERIOD
KEY_SLASH
KEY_NUM0
KEY_NUM1
KEY_NUM2
KEY_NUM3
KEY_NUM4
KEY_NUM5
KEY_NUM6
KEY_NUM7
KEY_NUM8
KEY_NUM9
KEY_NUMMULTIPLY
KEY_NUMADD
KEY_NUMSLASH
KEY_NUMSUBTRACT
KEY_NUMDECIMAL
KEY_NUMDIVIDE

As a convenience, the commands KeyDown and KeyHit can also be used to test non-keyboard devices using these additional constants:

KEY_LMB 'Left mouse button
KEY_RMB 'Right mouse button
KEY_MMB 'Middle mouse button

KEY_JOY0_A 'A button on joystick 0
KEY_JOY0_B 'B button on joystick 0
KEY_JOY0_X 'X button on joystick 0
KEY_JOY0_Y 'Y button on joystick 0
KEY_JOY0_LEFT 'left button on joystick 0
KEY_JOY0_UP 'up button on joystick 0
KEY_JOY0_RIGHT 'right button on joystick 0
KEY_JOY0_DOWN 'down button on joystick 0

KEY_TOUCH0 'First touch - note: 32 touch codes supported. KEY_TOUCHn=KEY_TOUCH0+n, where n>=0 and n<32

The following constants are for use with MouseDown and MouseHit:

MOUSE_LEFT
MOUSE_RIGHT
MOUSE_MIDDLE

The following constants are for use with JoyDown and JoyHit:

JOY_A
JOY_B
JOY_X
JOY_Y
JOY_LB
JOY_RB
JOY_BACK
JOY_START
JOY_LEFT
JOY_UP
JOY_RIGHT
JOY_DOWN
JOY_LSB
JOY_RSB
JOY_MENU

The following constants are for use with GetChar:

CHAR_TAB
CHAR_BACKSPACE
CHAR_ENTER
CHAR_ESCAPE
CHAR_PAGEUP
CHAR_PAGEDOWN
CHAR_END
CHAR_HOME
CHAR_LEFT
CHAR_UP
CHAR_RIGHT
CHAR_DOWN
CHAR_INSERT
CHAR_DELETE