Is it possible to display all events that are generated in Xorg? Such as keyboard pressed, mouse events…?
Xorg – How to Monitor Keyboard and Mouse Events in X
eventskeyboardmousexorg
eventskeyboardmousexorg
Is it possible to display all events that are generated in Xorg? Such as keyboard pressed, mouse events…?
Best Answer
A pretty quick search would likely yield
xev
as a result. It will not show you everything that is pressed or typed in X ever. But rather, will allow you to see information about keycodes and mouse movements.However, with the
-root
option, you might be able to getxev
to monitor the whole X session. Note, if you do this, you'll make it pretty difficult to actually interact with any program sincexev
will be capturing all input.xev -root
comes with an implied "YMMV". Another possible solution is to usexinput
to get the job done (though you need a recent version (1.6.1 or above)):While the above should be able to capture all events, if your
xinput
doesn't supporttest-xi2
or--root
, you can usexinput test
on a particular keyboard or mouse device.See also this other question: Record every keystroke and store in a file