Basic but really powerful recording and playback of raw ev events. This is useful for short-term recording and playback and especially helpful if your devices are not conventional you want support for relative mouse input which is especially needed in games.
Adjust the devices to be recorded in macrec.py
at the end of the file. Use evtest
to see what devices have which number (/dev/input/event<X>
).
Then you can just run the script: ./maccrec.py > recording
. The recording will automaticially stop if you press the ESC key (can be adjusted in the code as well).
Feed the contents of maccrec.py
into macplay.py
: cat recording | ./macplay.py
. Please note that depending on what you recorded, it may be hard to stop the playback. Best to run this from a terminal opened somewhere else (e.g. your smartphone).
If you rebooted your machine or replugged a bunch of input-devices, the event id may also not be correct. So not really suited for really long term recording.