通过鼠标按钮触发自动键脚本-如何? [英] Triggering AutoKey Script via Mouse Button - How To?

查看:125
本文介绍了通过鼠标按钮触发自动键脚本-如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢通过按下鼠标中键(通过窗口过滤器限制为某个应用程序)来触发AutoKey脚本.不幸的是,自动键仅允许我设置键盘快捷键,而鼠标键却被完全忽略.似乎AutoKey根本不允许鼠标按钮作为触发器. (请参见下面的选择屏幕.)

I like to trigger an AutoKey script by pressing middle mouse (restricted to a certain application via window filter). Unfortunately AutoKey only lets me set keyboard short-cuts while mouse buttons are completely ignored. It seems AutoKey does not at all allow mouse buttons as triggers. (See selection screen below.)

有什么解决方法可以让我通过按下鼠标按钮来运行AutoKey脚本?

Is there any workaround that lets me run an AutoKey script via pressing a mouse button?

推荐答案

看看xbindkeys.我使用它来使单个修改键变成热键(例如RCtrl),但我读到它也能够使用鼠标按钮作为触发器. https://www.linux.com/news/start-programs-pro- xbindkeys

Take a look at xbindkeys. I use it to make single modifier keys to hotkeys (such as RCtrl), but I read it is also capable of using mouse buttons as trigger. https://www.linux.com/news/start-programs-pro-xbindkeys

然后,您可以将"bash -c'xdotool key Ctrl + Shift + Super + Alt + 1'"之类的命令分配给鼠标按钮,并在Autokey中创建热键脚本以等待此组合.

Then you can assign a command like "bash -c 'xdotool key Ctrl+Shift+Super+Alt+1'" to the mouse button, and make a Hotkey-Script in Autokey waiting for this combination.

这篇关于通过鼠标按钮触发自动键脚本-如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆