I want to know which files belong to keystrokes and mouse clicks, and what kind of data is sent to them.
My main purpose of asking this question is key logging. I want to write a key logger script that does some tasks like below:
- Everywhere I type a special word, I can run a command in background. For example, when I type Firefox, everywhere in the OS, Firefox is opened, unless I hold down some special key like alt key.
- I can have a comprehensive log file of the key strokes and mouse clicks.
- When I have changed input language of keyboard and a special program, i.e. terminal, is open, it automatically changes the language to English.( I don't mean changing the input language, I mean a script that changes the other-language key strokes so that the program thinks it is in English language.)
I also want to detect key loggings in my system (if any) by knowing which files a key logger needs to track.
Notes:
- I want to do key logging in the lowest run levels. The lower the run level is, the better my problem is solved.
- I have also read some questions like "Unix User Level
Keylogger", but these questions have some limitations, i.e.
key logging only occurs in terminal. I don't want to use commands like
script
. I want to do key logging in the deep, comprehensive way and without limitations. - There may be other and better ways to do the things I have listed above. But as I have said, I my purpose is to learn key logging and know more about files which relate to keyboard and mouse input.)
I know that my question may have a long answer. If so, I want to know the following:
What files belong to key strokes?
What files belong to the mouse clicks?( This one is less important than previous.)
What kind of data is sent to these files?
What commands may help me so I can reach my purposes I had listed above?