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

From: Rémi Denis-Courmont remi.denis-courmont at nokia.com
Date: Thu Jan 28 10:43:48 EET 2010
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.
> Failed sofar :(
> Using Fremantle/Hildon/GTK
> 
> Any suggestions are welcome!

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).

If you just want to see keyboard input, then you'd open the corresponding 
file(s) in /dev/input/.

-- 
Rémi Denis-Courmont
Nokia Devices R&D, Maemo Software, Helsinki
More information about the maemo-developers mailing list