How to grab key combination event in GDK?


I know how to grab a single key event with gdk, but I'd like to know how to
grab a key combination  that is *not* using a modifier key. For example I
would like to grab when 'GDK_KEY_a' and 'GDK_KEY_right' are pressed
simultaneously. As far as I understand, the GdkEventKey structure allows
only one key to be grabbed at a time (with or without a  modifier key).

In SDL, there is the function SDL_GetKeyState() that gets a snapshot of the
keyboard state; it returns a pointer to an array; then every key can be
checked if pressed or not. Is there something similar in GDK? If not how
could I achieve this?

Thank you

View this message in context:
Sent from the Gtk+ - General mailing list archive at

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]