作者:王建毓桂恩佳士 | 来源:互联网 | 2023-05-19 17:40
Ihavebeentryingtousepythontobindmycustomizeeventtokeyboardeventwithspecificeventco
I have been trying to use python to bind my customize event to keyboard event with specific event code number like below
我一直在尝试使用python将我的自定义事件绑定到具有特定事件代码编号的键盘事件,如下所示
ctypes.windll.user32.keybd_event('0x24',0,2,0)
but as you already know
但正如你已经知道的那样
windll
the library only worked on Windows OS. how can I do something like this in Linux machines? I read about
该库仅适用于Windows操作系统。我怎样才能在Linux机器上做这样的事情?我读到了
CDLL('libc.so.6')
but I can't figure it out if this library is helpful or not?
但如果这个图书馆有用,我无法弄明白?
is there another way to set keypress listener in OS level with python using the virtual key code?
是否有另一种方法使用虚拟键代码使用python在OS级别设置keypress侦听器?
1 个解决方案