keylogger
keylogger copied to clipboard
feat(keylogger): more debugging info
Hello, thanks for publishing your project. I found timestamps and press types useful for debugging. Feel free to merge or close at your discretion
Not sure if @caseyscarborough still monitors this, but I can +1 the timestamps. I was about to submit a pull request of a similar change that I had made before I found yours.
I used this to record keystrokes during the process of data collection, so having a consistent machine-friendly format was critical.
I do think this could be useful. I think for the sake of maintaining the current functionality and the minimizing the size of the log file, the default behavior could remain the same, and perhaps a flag could be included like --include-timestamps
or --debug
to enable this functionality.
Could I suggest a flag like --format=csv
or similar? It would make it easier to expand the project to support different output formats on the future.
Since people in this thread seem to be interested: my fork adds timestamps, keycode logging, key press/release logging, and modifier flags logging for every keystroke. (I also just print to stdout
instead of writing to a file, since you can ./keylogger > keystrokes.log
from the command line, or from your plist, or whatever.)
Maybe you will find the code useful. Cheers.
![image](https://user-images.githubusercontent.com/5308024/169873139-75068771-f0c0-4c25-8371-4d16573b4625.png)
Follow-up: I also added a Python script that parses the output of my keylogger
and writes the events into a SQLite3 database, see https://github.com/andmis/keylogger/commit/a3b43bfd5965d2be6856d3bdb409cdeac5c35038.