Mouse button remapping in Ubuntu 20.10

Does anyone know a good way to remap the mouse buttons in 20.10?
Currently I am using the mx keys and Logitech mx3 and want the thumb button on the mx3 to do the same thing as the super key. Also would be nice to have a function to enable gestures, like the Logitech software does on windows. Press the thumb button and swipe in one direction to change the virtual desktop.
Thanks in advance

You would need to create that software or add a gesture extension to libinput.
https://wiki.archlinux.org/index.php/Libinput#Gestures

If you are using libinput, then you should be able to do that.
https://wiki.archlinux.org/index.php/Libinput#Manual_button_re-mapping

1 Like

Xbindkeys works very well. You can use xte with xbindkeys to remap anything on the mouse. You can use xev to find out what the button code is. If your mouse is supported by the software known as piper it will make things even easier. I’ve also heard people mention triggerhappy but I have never used it.

If you want to change desktops etc with mouse gestures then I suggest running KDE with X11 as it has built in gestures that you can map to do basically anything - for example: You set the KDE plasma shortcut to close a window to be super+x and then you use gestures (found under shortcuts - custom) and you set the command to: xte ‘keydown Super_L’ ‘keydown x’ ‘keyup Super_L’ ‘keyup x’. Then you set the gesture to be whatever you want.

Mouse gestures is such an OP feature that it makes it impossible for me to move to Wayland as it does not support it yet out-of-the-box on Debian (not anywhere if I am not mistaken, nor planned to implement). Mouse gestures is such a killer feature that I am considering making a video on it and lobbying to get it built because I’d rather die than not have it. I can: Snap windows anywhere, maximize, close, minimize, change desktops, change activities, open terminals, open browsers and OH MY does it blow you mind once you get used to it.

If anyone knows of Wayland gesture software provided in the Debian repos I’d be most utterly extremely thankful.

1 Like