[Xcb] [RFC] xcb/util-keysyms input handling patch

Michael Stapelberg michael+xcb at stapelberg.de
Thu Oct 11 02:51:46 PDT 2012


Hi Daniel,

Daniel Martin <consume.noise at gmail.com> writes:
> Why don't you use the XInput2 extension, i.e. with XIGrabKeycode()? On a key
> press/release event you'll receive a XIDeviceEvent, which contains
> everything you need:
> - key code in the 'detail' field and
> - active modifiers in 'mods'.
> Just have a look at /usr/include/X11/extensions/XInput2.h.
Thanks for this suggestion. I simply wasn’t aware that XInput2 offers
better possibilities in this area.

It looks like the currently supported version of XInput in XCB is
version 1.4, though, see
http://cgit.freedesktop.org/xcb/proto/tree/src/xinput.xml

Also, the xinput code isn’t even built by default:
http://cgit.freedesktop.org/xcb/libxcb/tree/configure.ac#n194

As far as I can tell, in XInput 1.4, there is no DeviceEvent with the
'mods' field you were talking about.

Can anyone lose a few words about the state of XInput in XCB?

-- 
Best regards,
Michael


More information about the Xcb mailing list