Results 1 to 5 of 5
Hi!
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-25-2010 #1Just Joined!
- Join Date
- May 2010
- Posts
- 2
Keyboard hook [C++]
Hi!
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.
- 05-25-2010 #2
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
- 05-29-2010 #3Just Joined!
- Join Date
- May 2010
- Posts
- 2
I think I found the function. It's inb(). When I finished first version I will post
- 09-07-2010 #4Just Joined!
- Join Date
- Sep 2010
- Posts
- 14
- 09-17-2010 #5Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,232
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.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote

