keylogger icon indicating copy to clipboard operation
keylogger copied to clipboard

feat(keylogger): more debugging info

Open alexpyoung opened this issue 4 years ago • 5 comments

Hello, thanks for publishing your project. I found timestamps and press types useful for debugging. Feel free to merge or close at your discretion

alexpyoung avatar May 13 '20 01:05 alexpyoung

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.

beyarkay avatar Feb 22 '22 19:02 beyarkay

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.

caseyscarborough avatar Feb 27 '22 22:02 caseyscarborough

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.

beyarkay avatar Feb 28 '22 05:02 beyarkay

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

andmis avatar May 23 '22 17:05 andmis

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.

andmis avatar May 23 '22 17:05 andmis