I have ubuntu 16.04.

Out of curiosity, is there a way to see how much have you clicked, and/or which keys have you pressed the most in a period?

Like a system log or something similar, that could register events in every app/program.

For now, I don't want to install a keylogger, I'm looking for some system related event first.

Example of the wanted log:

Today I have pressed

  • the left click 13.854 times
  • the Enter key 983 times
  • The Space key 15.368 times
  • The Control key 4.568 times
  • ...
  • 2
    Meta is only for questions about the Ask Ubuntu Site and the underlying StackExchange software it uses. It is not the place for support questions or inquiries like this one which are not related to the Ask Ubuntu website – Thomas Ward Jun 29 '18 at 19:00
  • 1
    I said o didn't want a keylogger, in the other post the user installed one. And it was only for keyboard, how about mouse? – res Jul 1 '18 at 9:30
  • You could still use a keylogger and write a script to count the number of times each key was pressed. – WinEunuuchs2Unix Jul 1 '18 at 18:30
  • How would you expect to left click 13 .854 times? – Seth Jul 2 '18 at 2:55
  • 1
    @Seth, in a normal day I would say that no, it is kind of impossible to achieve this many clicks, but if you are gaming this is a reasonable number. – res Jul 2 '18 at 10:58

Since I couldn't find an answer here, I would say that the right answer is:

There is no such thing in Linux/Ubuntu.

If you want to know the amount of key strokes and clicks you did, you will have to install some third-party program, that may or may not use your information for God knows what.

Key loggers do not have what I'm looking for: they only record the phrases I typed and the program name in a text file, like:

15/07/2005 | MSN Messenger[4] | Text: Hey there, want to chat?<CTRL><ENTER>

So, I would have to write a shell script to extract only the typed part, and count every letter individually. But how about mouse clicks? Function-keys?

In other words, a key-logger does not fit my needs.

I did manage to find another kind of program, specifically designed for this purpose, with heat maps and graphics for mouse and keys, but as I mentioned above, the download site is not that trustworthy, it isn't available in the Ubuntu market store, and it demands a Facebook login ....

  • 1
    If you want to write a script on your own, you may want to look at programs like evtest or xinput, both of which are available in the official repositories. They will also display mouse input events (or even media button events from bluetooth speakers for example). If you are into software development, you can write an application that reads from the /dev/input/* devices directly as described here. – danzel Jul 9 '18 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.