[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg
Subject:    Re: xinput2 system-wide event listening
From:       Peter Hutterer <peter.hutterer () who-t ! net>
Date:       2015-06-16 0:32:01
Message-ID: 20150616003201.GA6869 () jelly ! redhat ! com
[Download RAW message or body]

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

_______________________________________________
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic