[maemo-developers] How to capture ALL key events, no focus/No-GUI

From: Stefan Iwanowitsch stiw at ised.de
Date: Thu Jan 28 11:53:13 EET 2010
Rémi Denis-Courmont schrieb:
> On Thursday 28 January 2010 10:33:20 ext Stefan Iwanowitsch, you wrote:
>> Hi everybody,
>> I've tried to figure out for some days, how I can capture ALL key events
>> even if I have no focus on my window or if my app is running without GUI.
> If you actually want to steal the keyboard input from other application, you 
> would normally send a GrabKeyboard request to the X server (XGrabKeyboard via 
> Xlib or xcb_grab_keyboard via XCB).
I want normal processing of keyboard events and just want to trigger
actions upon certain key combinations/sequences.
According to the documentation XGrabKeyboard() seems to prevent further
processing in other applications and there is no easy way to re-enqueue
key events I'm not interested in.
> If you just want to see keyboard input, then you'd open the corresponding 
> file(s) in /dev/input/.
Can I read from /dev/input without interfering with other consumers? And
do you happen to know, where I can find specs on the input device files?

More information about the maemo-developers mailing list