Logo Search packages:      
Sourcecode: wayland-demos version File versions  Download package

static void key_handler ( struct window window,
struct input input,
uint32_t  time,
uint32_t  key,
uint32_t  unicode,
uint32_t  state,
void *  data 
) [static]

CALLBACK function, Wayland informs about key event.

Parameters:
windowwindow
keykeycode
unicodeassociated character
statepressed or released
modifiersmodifiers: ctrl, alt, meta etc.
datauser data associated to the window

Definition at line 203 of file eventdemo.c.

References log_key.

Referenced by eventdemo_create().

{
      uint32_t modifiers = input_get_modifiers(input);

      if(!log_key)
            return;

      printf("key key: %d, unicode: %d, state: %d, modifiers: %d\n",
             key, unicode, state, modifiers);
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index