getting all kbd events
peter.hutterer at who-t.net
Wed Jul 8 17:01:28 PDT 2009
On Wed, Jul 08, 2009 at 10:24:20PM +0200, Nokan Emiro wrote:
> On Wed, Jul 8, 2009 at 12:39 PM, Daniel Stone <daniel at fooishbar.org> wrote:
> > On Wed, Jul 08, 2009 at 10:15:08AM +0000, Nokan Emiro wrote:
> > > 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. :)
> Oops, then I've something misunderstood. I've read in Xkb doc, that:
> "...all Xkb keyboard status events are reported to all interested clients,
> regardless of which window currently has the keyboard focus and
> regardless of the grab state of the keyboard."
> I was happy because this is what I need.
> XSelectInput() with KeyPressMask and KeyReleaseMask are out of
> my interest because they lack if any other client grabs the keyboard.
> > 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.
> Is Xi2 able to deliver me key events when an XGrabKeyboard() by a
> different client is in effect?
no. that's kinda the point of grab (amongst other things).
More information about the xorg