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.)
Is there any workaround that lets me run an AutoKey script via pressing a mouse button?
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With