31 #ifndef __KEYBOARD_H__ 32 #define __KEYBOARD_H__ 36 #define MOD_SHIFT_L (1 << 0) 37 #define MOD_SHIFT_R (1 << 1) 38 #define MOD_SHIFTLOCK (1 << 2) 39 #define MOD_CAPSLOCK (1 << 3) 40 #define MOD_CONTROL_L (1 << 4) 41 #define MOD_CONTROL_R (1 << 5) 42 #define MOD_META_L (1 << 6) 43 #define MOD_META_R (1 << 7) 44 #define MOD_MODESHIFT (1 << 8) 45 #define MOD_NUMLOCK (1 << 9) 46 #define MOD_COMPOSE (1 << 10) 47 #define MOD_HOLDSCREEN (1 << 11) 48 #define MOD_COMMAND (1 << 12) 49 #define MOD_COMMAND1 (1 << 13) 50 #define MOD_COMMAND2 (1 << 14) 51 #define MOD_MODELOCK (1 << 15) 53 #define MOD_ANYSHIFT (MOD_SHIFT_L | MOD_SHIFT_R | MOD_SHIFTLOCK) 54 #define MOD_ANYCONTROL (MOD_CONTROL_L | MOD_CONTROL_R) 55 #define MOD_ANYMETA (MOD_META_L | MOD_META_R) 57 #define MOD_ONESET(val, mask) (((val) & (mask)) != 0) 58 #define MOD_ALLSET(val, mask) (((val) & (mask)) == (mask)) keyboard_event_type type
Definition: keyboard.h:72
int32_t s32
32bit signed integer
Definition: gctypes.h:24
Definition: keyboard.h:68
Definition: keyboard.h:65
s32 KEYBOARD_Init(keyPressCallback keypress_cb)
Definition: keyboard.c:479
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
u16 modifiers
Definition: keyboard.h:73
s32 KEYBOARD_Deinit(void)
Definition: keyboard.c:604
keyboard_event_type
Definition: keyboard.h:64
uint16_t u16
16bit unsigned integer
Definition: gctypes.h:18
Definition: keyboard.h:66
s32 KEYBOARD_FlushEvents(void)
Definition: keyboard.c:646
s32 KEYBOARD_GetEvent(keyboard_event *event)
Definition: keyboard.c:631
Definition: keyboard.h:67
struct _cl_event * event
Definition: glext.h:8406
void(* keyPressCallback)(char symbol)
Definition: keyboard.h:78
u8 keycode
Definition: keyboard.h:74
u16 symbol
Definition: keyboard.h:75
uint8_t u8
8bit unsigned integer
Definition: gctypes.h:17
Definition: keyboard.h:71