I have an odd issue where the XTEST keyboard on my PC will randomly send the 255 keycode, which turns on the screen if it's off. I've disabled most suspect programs like KDE Connect, but the issue is still there. Is there any way to see which exact process is responsible for the keystroke?
2 Answers
There is the xev program for graphic mode - see the man page of xev.
On Arch, the package is xorg-xev.
- 1This doesn't specify the device that sent the keystroke, nevermind the specific program. This was the first thing I reached for, but it doesn't solve the problem.Selicre– Selicre2021-12-23 12:38:52 +00:00Commented Dec 23, 2021 at 12:38
I managed to find the culprit through the use of lsof -F c /usr/lib/libXtst.so, which let me see which processes had the XTEST library loaded to send keystrokes.
As it turned out, the culprit was bsnes-plus' implementation of suppressing the screensaver, which, absurdly enough, runs even when the emulator is paused. Thankfully, it's pretty easy to patch out.