Instructions how to capture keyboard and mouse events and turn them into human readable output.
- Run
evtest
without any argments and see which event device you need to use. - Run the following command for the keyboard events:
evtest /dev/input/event5 | grep --line-buffered 'EV_KEY' | sed -r -e 's/.*\(KEY_/Keyboard: /' -e 's/\), value 0/ - UP/' -e 's/\), value 1/ - DOWN/' -e 's/\), value 2/ - HOLD/'
Example of the output:
Keyboard: Z - DOWN