Results 1 to 1 of 1
I need to know on Linux when a user press a key or use a button of his
mouse even when my app is not in focus. I only successed ...
- 01-03-2010 #1Just Joined!
- Join Date
- Dec 2009
- Posts
- 3
listening to Xserver
I need to know on Linux when a user press a key or use a button of his
mouse even when my app is not in focus. I only successed in writing a program that listen to an event when the window is in focus using xSelectInput.
The problem is that I can have these events only if I make a client
window which have the focus on it [I use these maks
XSelectInput(display, win, KeyPressMask |ButtonPressMask); ]
If I ask directly for the main root window events
[XSelectInput(display, root_window, KeyPressMask |ButtonPressMask);] I
get an error msg.
how can I listen to all keypressed/release events ?
Thanks in advance.


Reply With Quote