Listening to keyboard events without trapping them?

后端 未结 4 1747
别跟我提以往
别跟我提以往 2021-02-05 14:03

I\'m writing an command-line application which listens for Control key release events in X Windows and alerts another process when it detects them.

Being new to GNU/Linu

4条回答
  •  深忆病人
    2021-02-05 14:30

    Note that the XRecord extension continues to be broken in a few distributions. The reason I hadn't gone back and updated that library for a while was because it was broken in Ubuntu for multiple releases. There's a way to do it as well with an XInput overlay, (I'm told) but I never pursued that because I didn't want to deal with an overlay rather than hooking the X events directly.

    Comment back if there's any issues with using the code in the pyxhook lib, I tried to make it as simple/robust as possible, but I may have missed stuff when putting it together. It was a while ago.

提交回复
热议问题