GATE
inputs.h File Reference

Defines data types and values for input devices like keyboards and pointers (mouse) More...

#include "gate/gate_core_api.h"
#include "gate/gatetypes.h"

Macros

#define GATE_KBD_KEYSTATE_NONE   0x00
 
#define GATE_KBD_KEYSTATE_CTRL   0x01
 
#define GATE_KBD_KEYSTATE_MENU   0x02
 
#define GATE_KBD_KEYSTATE_SHIFT   0x04
 
#define GATE_KBD_KEY_UNKNOWN   0x00 /* unknown/unsupported key */
 
#define GATE_KBD_KEY_CTRL   0x01 /* CONTROL COMMAND */
 
#define GATE_KBD_KEY_MENU   0x02 /* MENU / ALT */
 
#define GATE_KBD_KEY_SHIFT   0x03 /* SHIFT */
 
#define GATE_KBD_KEY_CLEAR   0x07 /* clear */
 
#define GATE_KBD_KEY_BACKSPACE   0x08 /* back space */
 
#define GATE_KBD_KEY_TAB   0x09 /* horizontal tabulator */
 
#define GATE_KBD_KEY_RETURN   0x0d /* RETURN / ENTER key */
 
#define GATE_KBD_KEY_LEFT   0x11 /* arrow left */
 
#define GATE_KBD_KEY_UP   0x12 /* arrow up */
 
#define GATE_KBD_KEY_RIGHT   0x13 /* arrow right */
 
#define GATE_KBD_KEY_DOWN   0x14 /* arrow down */
 
#define GATE_KBD_KEY_PGUP   0x15 /* page up / PRIOR */
 
#define GATE_KBD_KEY_PGDOWN   0x16 /* page down /NEXT */
 
#define GATE_KBD_KEY_HOME   0x17 /* home / pos1 */
 
#define GATE_KBD_KEY_END   0x18 /* end */
 
#define GATE_KBD_KEY_INSERT   0x19 /* insert key */
 
#define GATE_KBD_KEY_DELETE   0x1a /* delete key */
 
#define GATE_KBD_KEY_ESCAPE   0x1b /* escape key */
 
#define GATE_KBD_KEY_PAUSE   0x1c /* pause key */
 
#define GATE_KBD_KEY_CAPITAL   0x1d /* caps lock */
 
#define GATE_KBD_KEY_NUMLOCK   0x1e /* num-lock switch */
 
#define GATE_KBD_KEY_SCROLLLOCK   0x1f /* scroll-lock switch */
 
#define GATE_KBD_KEY_SPACEBAR   0x20 /* space bar */
 
#define GATE_KBD_KEY_CTRL_LEFT   0x21 /* control key left */
 
#define GATE_KBD_KEY_CTRL_RIGHT   0x22 /* control key right */
 
#define GATE_KBD_KEY_MENU_LEFT   0x23 /* left menu/ALT key */
 
#define GATE_KBD_KEY_MENU_RIGHT   0x24 /* right menu/ALT key */
 
#define GATE_KBD_KEY_SHIFT_LEFT   0x25 /* left SHIFT key */
 
#define GATE_KBD_KEY_SHIFT_RIGHT   0x26 /* right SHIFT key */
 
#define GATE_KBD_KEY_START_LEFT   0x27 /* WIN/START key left */
 
#define GATE_KBD_KEY_START_RIGHT   0x28 /* WIN/START key right */
 
#define GATE_KBD_KEY_SELECT   0x29
 
#define GATE_KBD_KEY_PRINTSCREEN   0x2a
 
#define GATE_KBD_KEY_PRINT   0x2b
 
#define GATE_KBD_KEY_EXECUTE   0x2c
 
#define GATE_KBD_KEY_HELP   0x2d
 
#define GATE_KBD_KEY_APPS   0x2e
 
#define GATE_KBD_KEY_SLEEP   0x2f
 
#define GATE_KBD_KEY_0   0x30
 
#define GATE_KBD_KEY_1   0x31
 
#define GATE_KBD_KEY_2   0x32
 
#define GATE_KBD_KEY_3   0x33
 
#define GATE_KBD_KEY_4   0x34
 
#define GATE_KBD_KEY_5   0x35
 
#define GATE_KBD_KEY_6   0x36
 
#define GATE_KBD_KEY_7   0x37
 
#define GATE_KBD_KEY_8   0x38
 
#define GATE_KBD_KEY_9   0x39
 
#define GATE_KBD_KEY_A   0x41
 
#define GATE_KBD_KEY_B   0x42
 
#define GATE_KBD_KEY_C   0x43
 
#define GATE_KBD_KEY_D   0x44
 
#define GATE_KBD_KEY_E   0x45
 
#define GATE_KBD_KEY_F   0x46
 
#define GATE_KBD_KEY_G   0x47
 
#define GATE_KBD_KEY_H   0x48
 
#define GATE_KBD_KEY_I   0x49
 
#define GATE_KBD_KEY_J   0x4a
 
#define GATE_KBD_KEY_K   0x4b
 
#define GATE_KBD_KEY_L   0x4c
 
#define GATE_KBD_KEY_M   0x4d
 
#define GATE_KBD_KEY_N   0x4e
 
#define GATE_KBD_KEY_O   0x4f
 
#define GATE_KBD_KEY_P   0x50
 
#define GATE_KBD_KEY_Q   0x51
 
#define GATE_KBD_KEY_R   0x52
 
#define GATE_KBD_KEY_S   0x53
 
#define GATE_KBD_KEY_T   0x54
 
#define GATE_KBD_KEY_U   0x55
 
#define GATE_KBD_KEY_V   0x56
 
#define GATE_KBD_KEY_W   0x57
 
#define GATE_KBD_KEY_X   0x58
 
#define GATE_KBD_KEY_Y   0x59
 
#define GATE_KBD_KEY_Z   0x5a
 
#define GATE_KBD_KEY_NUM0   0x60
 
#define GATE_KBD_KEY_NUM1   0x61
 
#define GATE_KBD_KEY_NUM2   0x62
 
#define GATE_KBD_KEY_NUM3   0x63
 
#define GATE_KBD_KEY_NUM4   0x64
 
#define GATE_KBD_KEY_NUM5   0x65
 
#define GATE_KBD_KEY_NUM6   0x66
 
#define GATE_KBD_KEY_NUM7   0x67
 
#define GATE_KBD_KEY_NUM8   0x68
 
#define GATE_KBD_KEY_NUM9   0x69
 
#define GATE_KBD_KEY_ADD   0x6a
 
#define GATE_KBD_KEY_SUBTRACT   0x6b
 
#define GATE_KBD_KEY_MULTIPLY   0x6c
 
#define GATE_KBD_KEY_DEVIDE   0x6d
 
#define GATE_KBD_KEY_DECIMAL   0x6e
 
#define GATE_KBD_KEY_SEPARATOR   0x6f
 
#define GATE_KBD_KEY_F1   0x81
 
#define GATE_KBD_KEY_F2   0x82
 
#define GATE_KBD_KEY_F3   0x83
 
#define GATE_KBD_KEY_F4   0x84
 
#define GATE_KBD_KEY_F5   0x85
 
#define GATE_KBD_KEY_F6   0x86
 
#define GATE_KBD_KEY_F7   0x87
 
#define GATE_KBD_KEY_F8   0x88
 
#define GATE_KBD_KEY_F9   0x89
 
#define GATE_KBD_KEY_F10   0x8a
 
#define GATE_KBD_KEY_F11   0x8b
 
#define GATE_KBD_KEY_F12   0x8c
 
#define GATE_KBD_KEY_F13   0x8d
 
#define GATE_KBD_KEY_F14   0x8e
 
#define GATE_KBD_KEY_F15   0x8f
 
#define GATE_KBD_KEY_F16   0x90
 
#define GATE_KBD_KEY_F17   0x91
 
#define GATE_KBD_KEY_F18   0x92
 
#define GATE_KBD_KEY_F19   0x93
 
#define GATE_KBD_KEY_F20   0x94
 
#define GATE_KBD_KEY_F21   0x95
 
#define GATE_KBD_KEY_F22   0x96
 
#define GATE_KBD_KEY_F23   0x97
 
#define GATE_KBD_KEY_F24   0x98
 
#define GATE_KBD_KEY_BROWSER_BACK   0xa0
 
#define GATE_KBD_KEY_BROWSER_FORWARD   0xa1
 
#define GATE_KBD_KEY_BROWSER_REFRESH   0xa2
 
#define GATE_KBD_KEY_BROWSER_STOP   0xa3
 
#define GATE_KBD_KEY_BROWSER_SEARCH   0xa4
 
#define GATE_KBD_KEY_BROWSER_FAVORITES   0xa5
 
#define GATE_KBD_KEY_BROWSER_HOME   0xa6
 
#define GATE_KBD_KEY_VOLUME_MUTE   0xaa
 
#define GATE_KBD_KEY_VOLUME_DOWN   0xab
 
#define GATE_KBD_KEY_VOLUME_UP   0xac
 
#define GATE_KBD_KEY_MEDIA_NEXT   0xb0
 
#define GATE_KBD_KEY_MEDIA_PREVIOUS   0xb1
 
#define GATE_KBD_KEY_MEDIA_STOP   0xb2
 
#define GATE_KBD_KEY_MEDIA_PLAY   0xb3
 
#define GATE_KBD_KEY_LAUNCH_MAIL   0xc0
 
#define GATE_KBD_KEY_LAUNCH_MEDIA   0xc1
 
#define GATE_KBD_KEY_LAUNCH_APP   0xc2
 
#define GATE_KBD_KEY_LAUNCH_APP2   0xc3
 
#define GATE_KBD_KEY_ATTN   0xd0
 
#define GATE_KBD_KEY_CRSEL   0xd1
 
#define GATE_KBD_KEY_EXSEL   0xd2
 
#define GATE_KBD_KEY_ERASE_EOF   0xd3
 
#define GATE_KBD_KEY_PLAY   0xd4
 
#define GATE_KBD_KEY_ZOOM   0xd5
 
#define GATE_KBD_KEY_EQUAL   0xd6
 
#define GATE_KBD_KEY_SLASH   0xe1
 
#define GATE_KBD_KEY_BACKSLASH   0xe2
 
#define GATE_KBD_KEY_BRACE_LEFT   0xe3
 
#define GATE_KBD_KEY_BRACE_RIGHT   0xe4
 
#define GATE_KBD_KEY_QUOTE   0xe5
 
#define GATE_KBD_KEY_TILDE   0xe6
 
#define GATE_KBD_KEY_SEMICOLON   0xe7
 
#define GATE_KBD_KEY_IME_KANA   0xf0
 
#define GATE_KBD_KEY_IME_JUNJA   0xf1
 
#define GATE_KBD_KEY_IME_FINAL   0xf2
 
#define GATE_KBD_KEY_IME_KANJI   0xf3
 
#define GATE_KBD_KEY_IME_CONVERT   0xf4
 
#define GATE_KBD_KEY_IME_NONCONVERT   0xf5
 
#define GATE_KBD_KEY_IME_ACCEPT   0xf6
 
#define GATE_KBD_KEY_IME_MODECHANGE   0xf7
 
#define GATE_KBD_KEY_IME_PROCESS   0xf8
 
#define GATE_KBD_KEYMASK_NATIVE   0xffff0000
 

Typedefs

typedef gate_uint32_t gate_input_nativekeycode_t
 
typedef gate_uint32_t gate_input_keystates_t
 

Functions

GATE_CORE_API gate_size_t gate_keyboard_parse_vt100_symbols (char const *symbols, gate_size_t symbols_count, gate_input_keycode_t *gate_key, gate_input_keystates_t *gate_kbdstate, gate_char32_t *chara)
 

 
GATE_CORE_API gate_size_t gate_keyboard_build_vt100_symbols (gate_input_keycode_t gate_key, gate_input_keystates_t gate_kbdstate, char *symbols_buffer, gate_size_t symbols_buffer_capacity)
 

 
GATE_CORE_API gate_result_t gate_keyboard_parse_native_key (gate_input_nativekeycode_t native_key, gate_input_keycode_t *gate_key, gate_input_keystates_t *gate_kbdstate)
 

 
GATE_CORE_API gate_result_t gate_keyboard_build_native_key (gate_input_keycode_t gate_key, gate_input_keystates_t gate_kbdstate, gate_input_nativekeycode_t *native_key)
 

 
GATE_CORE_API gate_result_t gate_keyboard_native_key_to_unicode (gate_input_nativekeycode_t native_key, gate_char32_t *ptr_chr)
 
GATE_CORE_API gate_result_t gate_keyboard_unicode_to_native_key (gate_char32_t chr, gate_input_nativekeycode_t *ptr_native_key)
 

Detailed Description

Defines data types and values for input devices like keyboards and pointers (mouse)