[Xcb] Handling keyboard events

Thomas Hunger hto at arcor.de
Tue Mar 27 12:03:09 PDT 2007


Hi

> The xcb_key_press_event_t struct doesn't appear to have any fields
> that would store off this value. Is there a special function that
> needs to be called to get this value? XLib had a XKeyEvent and a
> function XLookupString() to allow you to get the virtual key code.
> Is there anything similar in XCB?

The untranslated keycode is stored in the member "detail". The util 
library of xcb shows how to retrieve the keysym in the keysyms 
directory:
 
http://gitweb.freedesktop.org/?p=xcb/util.git;a=tree

The new way using XKB would need a protocol description for XCB. But 
I do not know if there is a XML protocol description for the XKB 
extension yet.

Tom


More information about the Xcb mailing list