Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Free Guide: Linux from Scratch
Linux from Scratch describes the process of creating your own Linux system from scratch from an already installed Linux distribution, using nothing but the source code of software that you need.
This 318 page eBook provides readers with the background and instruction to design and build custom Linux systems. The resulting system will be compiled completely from the source code, and the user will be able to specify where, why, and how programs are installed. This eBook allows readers to fully customize Linux systems to their own needs and allows users more control over their system.
Click Here to receive the Linux from Scratch Guide absolutely free.
First of all I want to state, that my code is not a final application.
It only was a simple try to get the pressed keys together with the time, they were pressed.
I wanted to write an keylogger, which finds the keycodes, the characters and times of each press (the releass is not relevant for my application).
The keylogger should generate a file which will make it possible to enhance the keyboard layout for myself. I have my own key assignment already, because
as a german programmer I use all the "umlauts" (äöüßÖÄÜ) but also some french symbols (éáí...) and of course all the programmers symbols like "{([" and so on.
Attention: The closing parentheses, brackets and so on I do not use a lot, because the editors (like eclipse) normally enter them automatically.
I have not finished my project yet, because I have not yet found a simple way to get the characters out of the key codes.
The "xmodmap -pk" gives some information, but I have to find all the pressed modifier keys myself? Any Idea is welcome.
But now to the heavy Word "garbage" for my SUPER code example ;-)
Replace the fprintf to the follwing and the code is not as "garbage" any more: the leading zeros are now filled with "0"s and not with blanks " ".
But still garbage, if you don't know what it means (see Explanation below).
Here the number before the period(.) indicate the seconds, the number after the point show the microseconds of the key press or release.
A + means that the key was pressed and a - means that the key was released.
The last 2 numbers are the keys identifier (not the ascii or UTF number !!), but the keyboard-key-id: The character "a" for example is normally (us, german) located at key 30. But - and that's still my question - the character "A" is also located at key 30! I should find a simple way to find out, if shift, control and alt are pressed at a given time. I realy don't want to programmatically trace each press of a shift, control or alt key. Any ideas?
I have still the same problem. Because I want to find out, which keys are pressed how many times, I want to use a keylogger. The Dvorak Keyboard is generated for the english language, but I mostly write German or Java. So, I want to generate my own .Xmodmap (phi-dvorak).
Because eclipse writes some code for me, it is not sufficient to analyse my texts and code to find out, which keys I press most. Example: The "{" is pressed much more times than the "}"-Key, because eclispe writes the "}" itself.
But the above mentioned keyloger gets me the key-events rather than the key-codes. Thats why I was looking for another solution. Now, my code hangs at the XPeekEvent()-routine. Is it possible, that there is no way to get the X-Keycodes of all applications?
Heres my Idea, but I need help with that, because the program hangs at the XPeekEvent routine.
Hi! I just mapped the keycodes generated by the code written by PHI some time ago to the actual letters and symbols.
Now I need to flush the buffer just after reading the data so it will not be "picked up" by other software if possible.
What I mean is that I want to have my keylogger running while mplayer is running, but I don't want mplayer to interact to the keyboard keys except maybe for ESC.
I have finally created my own keyboard (without the use of a keylogger, but using statistics on german texts and java code). I don't know, if this is the best choice, but for me, it works fine:
I sincerely apologize for bumping this old thread, but I honestly believe my post is relevant and appropriate.
In search of a usable and reliable linux keylogger I stumbled upon this thread, and also with its help I created what is now another lkl and überkey comparable keylogger.
dynamically interprets console keymap (not very reliable, read documentation :P)
writes to log file
I'm sorry to say that it doesn't seem to work with USB keyboards despite them using input event interface. (I'm lacking USB peripherals to test with.)
I guess I'll keep working on it as time allows.
For now, logkeys suits me really well, better than lkl or uberkey ever did.
Thanks for listening!
Well, I recently wrote a rather nice keylogger (with some borrowed code), if you want I could post it somewhere (maybe even here) ... if the mods are ok with that...
or maybe I'll put it on my site.
Last edited by H_TeXMeX_H; 01-04-2010 at 12:59 PM.
Well, I recently wrote a rather nice keylogger (with some borrowed code), if you want I could post it somewhere (maybe even here) ... if the mods are ok with that...
or maybe I'll put it on my site.
If it works for a USB, awesome. you can send it to my email if i gave you that in private message. or you could post it here, paste it on a imagebin.ca.org or give me a link.
i'm not good with code. will i know how to tailor it to this system?
along with recording from local peripherals, would this keylogger also cover outside (intrusive) traffic? just curious.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.