xinput2 system-wide event listening

Peter Hutterer peter.hutterer at who-t.net
Mon Jun 15 17:32:01 PDT 2015


On Thu, Jun 11, 2015 at 03:09:09PM +0200, anton lancevič wrote:
> Does xinput2 provide some facility to listen for device in system-wide
> manner, i.e. listen to device events regardless of focused window or other
> x server clients listening to it? Or maybe there is other way to get hotkey
> events regardless of focused window?

not really. the traditional approach is to put a sync passive grab on the root
window to intercept the key and handle it accordingly.

That will of course conflict with your window manager if it handles the same
key and is likely started before your app.

You can somewhat work around it with XI2 raw events, but it's not
recommended.

Cheers,
   Peter



More information about the xorg mailing list