How to create a count of keystrokes
Closed this issue · 1 comments
kaihendry commented
Sorry my C skills are a bit rusty. But what I was after is an output which didn't contain the keystrokes necessarily for privacy reasons, but a running total.
The idea is that I want to measure how long a particular task takes in the amount of actions required. Key strokes in this case would be the action. Ideally mouse operations could be included too.
Otherwise best keylogger I've seen. :P
cyrus-and commented
Hi Kai, this may not be the right tool then, since its main purpose is to break someone's privacy. :)
You could adapt the code though or you can just filter its output:
./xkeylogger | grep -v '^\[+\] ' | tr -d '\n' | wc -m
grep -v '^\[+\] '
exclude the header lines;tr -d '\n'
remove additional newlines;wc -m
counts the characters (not bytes);
Use killall xkeylogger
when done.
For the mouse you'll need additional code since this program only parses keyboard events.