Keyboard hook [C++]
I'm writting application similar to AutoHotKey for Windows. First of all I need to know, which keys was pressed in system. For Windows it is so easy (some time ago I even wrote keylogger for Windows - of course for training, I used it only in my computer). I was googling for something like this for Linux i I didng find anything.
The best I found was XSelectInput but I need something like this for many windows. If some appliaction are avoiding it becouse of security reasons it's OK - I can live with it ;)
I think, none of Linux users would install something that can stole their passwords, so if You know how to do this for all appliaction I will be glad. For example I can think about some hotkeys in my internet browser, but this is application where are users are writting the most passwords.
I want to write it for Gnome first. Then, if I would make good appliaction I want to extend it for KDE and maybe another.
I'm sorry for my English - I'm still learning.
if you are looking to do it for gnome at first, you should take a look at GTK, since that is what gnome uses
KDE uses QT
the regular X window programming will work on anything with X, but it may be more cumbersome
I think I found the function. It's inb(). When I finished first version I will post ;)
Originally Posted by SubArrin
i realy need this...
i also go threw x window programming,does anybody know which function should be used to achieve the result..
in x i can extract events for a single window i create,but for other application i dont know how??
The most appropriate means to do this consistently for all keyboard input in the system would be to install a kernel module that would intercept the keyboard interrupts, then pass the data to the normal user-space code as well as your user-space code that will do something special with it.