Linux X11 - Global Keyboard Hook

后端 未结 5 1089
萌比男神i
萌比男神i 2021-01-30 14:26

Is it possible (or how) to create a mechanism (in Linux X11, C++) that works like a global hook in windows (SetWindowsHookEx())?

I would like to be able to catch the key

5条回答
  •  旧巷少年郎
    2021-01-30 14:42

    Use XTestFakeKeyEvent() from the XTest extension library to propagate fake key press / release events.

提交回复
热议问题