xmacroplay:
Reads lines from the standard input. It can understand the following lines:
Delay [sec] - delays the program with [sec] secundums
ButtonPress [n] - sends a ButtonPress event with button [n]
this emulates the pressing of the mouse button [n]
ButtonRelease [n] - sends a ButtonRelease event with button [n]
this emulates the releasing of the mouse button [n]
... snip lots more ...
可能你想破解xmon…
虽然没有简单的方法来钩住X协议。您将需要执行“深度数据包检查”,这在应用程序事件循环中相当容易,但并非如您所愿“像守护程序”或“全局击键”一样简单。在
所以,我知道这确实是暴力和无知,但我认为您必须包装X服务器,方法是在非标准端口上启动它或发布一个环境变量,就像您使用SSH隧道来转发X服务器连接一样。在
有一个名为Xmon的X协议监视器,它的源是可用的。这可能是一个好的起点。在
我想你可以用xmacroplay utility from xmacro在X窗口下这样做。或者直接使用它——使用subprocess模块将它的命令发送到标准输入,或者阅读源代码并找出它是如何做到的!我不认为它有python绑定。在
从xmacroplay网站
这可能是您感兴趣的命令
^{pr2}$还有一个Xnee也做了类似的事情。在
相关问题 更多 >
编程相关推荐