RetroArch
Classes | Macros | Typedefs | Enumerations | Functions
keyboard.h File Reference
#include "wsksymdef.h"
Include dependency graph for keyboard.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  keyboard_event
 

Macros

#define MOD_SHIFT_L   (1 << 0)
 
#define MOD_SHIFT_R   (1 << 1)
 
#define MOD_SHIFTLOCK   (1 << 2)
 
#define MOD_CAPSLOCK   (1 << 3)
 
#define MOD_CONTROL_L   (1 << 4)
 
#define MOD_CONTROL_R   (1 << 5)
 
#define MOD_META_L   (1 << 6)
 
#define MOD_META_R   (1 << 7)
 
#define MOD_MODESHIFT   (1 << 8)
 
#define MOD_NUMLOCK   (1 << 9)
 
#define MOD_COMPOSE   (1 << 10)
 
#define MOD_HOLDSCREEN   (1 << 11)
 
#define MOD_COMMAND   (1 << 12)
 
#define MOD_COMMAND1   (1 << 13)
 
#define MOD_COMMAND2   (1 << 14)
 
#define MOD_MODELOCK   (1 << 15)
 
#define MOD_ANYSHIFT   (MOD_SHIFT_L | MOD_SHIFT_R | MOD_SHIFTLOCK)
 
#define MOD_ANYCONTROL   (MOD_CONTROL_L | MOD_CONTROL_R)
 
#define MOD_ANYMETA   (MOD_META_L | MOD_META_R)
 
#define MOD_ONESET(val, mask)   (((val) & (mask)) != 0)
 
#define MOD_ALLSET(val, mask)   (((val) & (mask)) == (mask))
 

Typedefs

typedef void(* keyPressCallback) (char symbol)
 

Enumerations

enum  keyboard_event_type { KEYBOARD_CONNECTED, KEYBOARD_DISCONNECTED, KEYBOARD_PRESSED, KEYBOARD_RELEASED }
 

Functions

s32 KEYBOARD_Init (keyPressCallback keypress_cb)
 
s32 KEYBOARD_Deinit (void)
 
s32 KEYBOARD_GetEvent (keyboard_event *event)
 
s32 KEYBOARD_FlushEvents (void)
 

Macro Definition Documentation

◆ MOD_ALLSET

#define MOD_ALLSET (   val,
  mask 
)    (((val) & (mask)) == (mask))

◆ MOD_ANYCONTROL

#define MOD_ANYCONTROL   (MOD_CONTROL_L | MOD_CONTROL_R)

◆ MOD_ANYMETA

#define MOD_ANYMETA   (MOD_META_L | MOD_META_R)

◆ MOD_ANYSHIFT

#define MOD_ANYSHIFT   (MOD_SHIFT_L | MOD_SHIFT_R | MOD_SHIFTLOCK)

◆ MOD_CAPSLOCK

#define MOD_CAPSLOCK   (1 << 3)

◆ MOD_COMMAND

#define MOD_COMMAND   (1 << 12)

◆ MOD_COMMAND1

#define MOD_COMMAND1   (1 << 13)

◆ MOD_COMMAND2

#define MOD_COMMAND2   (1 << 14)

◆ MOD_COMPOSE

#define MOD_COMPOSE   (1 << 10)

◆ MOD_CONTROL_L

#define MOD_CONTROL_L   (1 << 4)

◆ MOD_CONTROL_R

#define MOD_CONTROL_R   (1 << 5)

◆ MOD_HOLDSCREEN

#define MOD_HOLDSCREEN   (1 << 11)

◆ MOD_META_L

#define MOD_META_L   (1 << 6)

◆ MOD_META_R

#define MOD_META_R   (1 << 7)

◆ MOD_MODELOCK

#define MOD_MODELOCK   (1 << 15)

◆ MOD_MODESHIFT

#define MOD_MODESHIFT   (1 << 8)

◆ MOD_NUMLOCK

#define MOD_NUMLOCK   (1 << 9)

◆ MOD_ONESET

#define MOD_ONESET (   val,
  mask 
)    (((val) & (mask)) != 0)

◆ MOD_SHIFT_L

#define MOD_SHIFT_L   (1 << 0)

◆ MOD_SHIFT_R

#define MOD_SHIFT_R   (1 << 1)

◆ MOD_SHIFTLOCK

#define MOD_SHIFTLOCK   (1 << 2)

Typedef Documentation

◆ keyPressCallback

typedef void(* keyPressCallback) (char symbol)

Enumeration Type Documentation

◆ keyboard_event_type

Enumerator
KEYBOARD_CONNECTED 
KEYBOARD_DISCONNECTED 
KEYBOARD_PRESSED 
KEYBOARD_RELEASED 

Function Documentation

◆ KEYBOARD_Deinit()

s32 KEYBOARD_Deinit ( void  )
Here is the call graph for this function:

◆ KEYBOARD_FlushEvents()

s32 KEYBOARD_FlushEvents ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ KEYBOARD_GetEvent()

s32 KEYBOARD_GetEvent ( keyboard_event event)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ KEYBOARD_Init()

s32 KEYBOARD_Init ( keyPressCallback  keypress_cb)
Here is the call graph for this function: