On Wed, Jul 08, 2009 at 10:15:08AM +0000, Nokan Emiro wrote: > On Wed, Jul 8, 2009, Timothy S. Nelson wrote: > > On Wed, 8 Jul 2009, Nokan Emiro wrote: > > How can I change the XkbSelectEvents's parameters to be messaged on all > >> keypresses? > > > > I'm not an X programmer, but doesn't xev do this already? And if > > so, couldn't you just look at the xev source? > > Thanks for the tip, but this is not what helps me out. xev uses plain Xlib, > but > the sample code in my mail uses XKBlib. xev calls XSelectInput(), in my > code > I would like to use XkbSelectEvents() for this purpose.
Well, you can use XkbSelectEvents() if you want, but it won't give you key events. :) Use Xi2 to select for XI_KeyPress and XI_KeyRelease on modern servers with an XInput version of 2.0 or later, or just plain old XSelectInput() with KeyPressMask and KeyReleaseMask. XKB only provides the mapping for key events you've received; it's not responsible for delivering you the key events in the first place. Cheers, Daniel
signature.asc
Description: Digital signature
_______________________________________________ xorg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xorg
