global key event callback in X?
Stefan Kombrink
katakombi at gmail.com
Wed Jun 27 02:17:08 PDT 2007
Hi all,
Intro:
-----
I am the author of qsynaptics [0] and ksynaptics [1], both touchpad
configuration utilities that manage settings of the xorg touchpad driver [2].
KSynaptics also clones the behaviour of a tool named 'syndaemon' meaning it
disables the touchpad for a certain time if a key press was detected.
Motivation:
------------
To be able to do so I indended to use the code of syndaemon which polls the
keyboard state every 20 ms.
That way ksynaptics ranks quite high on powertop [3].
Problem is that especially laptop-users experience many wake-ups if ksynaptics
polls every 20ms the keyboard state.
Question:
-----------
Is there any way to catch a sort-of global X key press event?
After looking at the docs I've got the impression that events (like in Qt) are
bound to a window and not received if that window isn't visible at all.
(For instance I tried to handle events for the root window, but it doesn't
receive any)
Is there a way to handle key events regardless which window is focussed but
also without loosing 'em?
Thank you all in advance and hopefully somebody could gimme some hint,
Stefan K. >8^)
PS: please CC me since I am not on the list ;)
References:
-------------
[0] http://qsynaptics.sf.net
[1] http://kde-apps.org/content/show.php/KSynaptics?content=17286
[2] http://web.telia.com/~u89404340/touchpad/
[3] http://www.linuxpowertop.org/
--
Warning! Insufficient or missing coffee in module "STOMACH".
User halted.
More information about the xorg
mailing list