FixIO Documentation

Back to summary

import "io/console";

ConsoleEvent class

Constants

EVENT_NONE
EVENT_CHAR_TYPED
EVENT_KEY_PRESSED
EVENT_CONSOLE_RESIZED
The event types.
MOD_CTRL
MOD_SHIFT
MOD_ALT
The key modifiers.
KEY_NONE
KEY_ESCAPE
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_PRINT_SCREEN
KEY_SCROLL_LOCK
KEY_PAUSE
KEY_GRAVE
KEY_NUM1
KEY_NUM2
KEY_NUM3
KEY_NUM4
KEY_NUM5
KEY_NUM6
KEY_NUM7
KEY_NUM8
KEY_NUM9
KEY_NUM0
KEY_MINUS
KEY_EQUAL
KEY_BACKSPACE
KEY_TAB
KEY_Q
KEY_W
KEY_E
KEY_R
KEY_T
KEY_Y
KEY_U
KEY_I
KEY_O
KEY_P
KEY_LBRACKET
KEY_RBRACKET
KEY_BACKSLASH
KEY_CAPS_LOCK
KEY_A
KEY_S
KEY_D
KEY_F
KEY_G
KEY_H
KEY_J
KEY_K
KEY_L
KEY_SEMICOLON
KEY_APOSTROPHE
KEY_ENTER
KEY_LSHIFT
KEY_Z
KEY_X
KEY_C
KEY_V
KEY_B
KEY_N
KEY_M
KEY_COMMA
KEY_PERIOD
KEY_SLASH
KEY_RSHIFT
KEY_LCONTROL
KEY_LMETA
KEY_LALT
KEY_SPACE
KEY_RALT
KEY_RMETA
KEY_RMENU
KEY_RCONTROL
KEY_INSERT
KEY_DELETE
KEY_HOME
KEY_END
KEY_PAGE_UP
KEY_PAGE_DOWN
KEY_LEFT
KEY_UP
KEY_RIGHT
KEY_DOWN
KEY_NUM_LOCK
KEY_NUMPAD_SLASH
KEY_NUMPAD_STAR
KEY_NUMPAD_MINUS
KEY_NUMPAD_PLUS
KEY_NUMPAD_ENTER
KEY_NUMPAD_DOT
KEY_NUMPAD0
KEY_NUMPAD1
KEY_NUMPAD2
KEY_NUMPAD3
KEY_NUMPAD4
KEY_NUMPAD5
KEY_NUMPAD6
KEY_NUMPAD7
KEY_NUMPAD8
KEY_NUMPAD9
The available keys.

Initialization

static function create_none(): ConsoleEvent
static function create_char_typed(char: Integer): ConsoleEvent
static function create_key_pressed(key: Integer, mod: Integer): ConsoleEvent
static function create_console_resized(width: Integer, height: Integer): ConsoleEvent
Creates a new event.

Properties

function get_type(): Integer
Returns the type of the event.
function get_char(): Integer
Returns the character when the event type is EVENT_CHAR_TYPED.
function get_key(): Integer
Returns the key when the event type is EVENT_KEY_PRESSED.
function get_modifiers(): Integer
Returns the modifiers when the event type is EVENT_KEY_PRESSED.
function get_width(): Integer
function get_height(): Integer
Returns the size of the console when the event type is EVENT_CONSOLE_RESIZED.
function to_string(): String
Returns the string representation of the event.