Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Triggering AutoKey Script via Mouse Button - How To?

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?

enter image description here

like image 799
pykong Avatar asked Jun 02 '15 23:06

pykong


1 Answers

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.

like image 90
Theo Avatar answered Sep 18 '22 05:09

Theo