If press "Win+W" or "Win+A", it opens a multitasking view. How rechange this hotkey to mouse key? Exp "LeftClick + RightClick" or "Middle Button + Right".
1 Answer
After lots and lots of digging, I found the answer — for me, at least! I hope this helps someone else who became addicted to the ease of use brought by combining Mac OS's Exposé and a five-buttoned mouse...
Firstly, I set up xbindkeys
using the information here: https://askubuntu.com/a/246849/777016
Specifically, I ran:
sudo apt-get install xbindkeys xautomation x11-utils
Then I used xev | grep -A2 ButtonPress
to figure out that my middle (mouse-wheel) button was button number 2.
Then I created the xbindkeys config file:
xbindkeys --defaults > $HOME/.xbindkeysrc
Then I edited the file $HOME/.xbindkeysrc
using nano, to add the following lines:
"dbus-send --session --dest=org.pantheon.gala --print-reply /org/pantheon/gala org.pantheon.gala.PerformAction int32:1"
b:2
You'll need to log out and then log back in for the changes to take effect.
The number after b:
is the mouse button number as reported by xev
.
I got the command to invoke multitasking view from this answer: https://elementaryos.stackexchange.com/a/11766/13212 — it wasn't exactly what I wanted, as I'd prefer "show all windows" to "multitasking view" but it's near enough. If anyone knows the commands to invoke other windowing features, please let me know!
You can also add those lines a second time but with + Release
on the end, if you want to be able to hold the button down and have the view revert on release. Sadly, to change windows you must click on it with the left button — you can't hold then release the middle button over the window you want, like with Mac OS's Exposé.