7

Since unfortunately Gnome does not offer any option to configure additional mouse buttons I used to achieve this simple goal by writing a tedious configuration file for xbindkeys.

What I wanted was far from super fancy stuff – as launching a rocket by hitting a mouse button – but only switching workspace by left or right clicking the scroll wheel of my Logitech mouse.

How this is done under Xorg has been answered many times, here for example: How to configure extra buttons in Logitech Mouse

But with Ubuntu 21.04 where – buckle up! – Wayland has become the default display manager, as of now fancy pancy things like xbindkeysand xdotool do not work anymore.

So my question: is there a way to launch missiles – ehm, sorry switch work spaces with my extra mouse button again? Or should I sell them and donate the money to Gnome Fondation?

Please do not propose libratbag and piper, I never got them working in any useful way...

heynnema
  • 70,711
user5950
  • 6,186
  • That wayland has become the default (not the first time, btw) doesn't mean that you can't keep using the old xorg. – ChanganAuto Apr 27 '21 at 21:08
  • @ChanganAuto Rightly said, Sir! And I'm stuck with Xorg for that very reason. But there a indubitably some good reasons to switch to Wayland and the mouse buttons are the hurdle that hundred me to follow them and jump back to the future of Ubuntu 17.10 (was it 17.10?). – user5950 Apr 27 '21 at 21:22
  • You could install Solaar. It has some configuration things for various Logitech mice. Otherwise, some Logitech settings, when set in Windows, carry over to Ubuntu. – heynnema Apr 27 '21 at 23:11
  • @guiverc Thanks for pointing this out and giving me the guidance I needed. I edited the question to bring in more in line and removed the thorn I put into communities eye. – user5950 Apr 27 '21 at 23:12
  • @heynnema does not give me any option to assign an action to the keys other than mouse clicks. For example you can make the scroll wheel do a right or left click and so on. – user5950 Apr 27 '21 at 23:16
  • Some mice show a rule editor that you might be able to configure. – heynnema Apr 27 '21 at 23:18
  • @heynnema If some one could show me where to find this editor I would be grateful. – user5950 Apr 27 '21 at 23:24
  • Go to the Solaar top panel icon, click, and select your mouse from the drop-down menu. A window will open with a Rule Editor button. I have not used it myself. Report back if it helps. – heynnema Apr 27 '21 at 23:26
  • 1
    @heynnema The editor is not available for my mouse (M510) and the documentation says: »Note that rule processing is only available when running under X11.« – user5950 Apr 27 '21 at 23:30
  • As per my prior comment, try setting something when in Windows (Using the Logitech software), and see if it carries over when you reboot into Ubuntu. – heynnema Apr 27 '21 at 23:35

1 Answers1

10

input-remapper

An easy to use tool to change the behaviour of your input devices.

The most comfortable solution I found is input-remapper. This application allows you, to map mouse buttons to shortcuts. I for example use it to switch workspace with the left and right click of my scroll wheel, what fits particularly good with the horizontal layout of workspaces in GNOME 40+:

screemsjpt

As you can see, the program comes with a GUI.

You can download an official DEB packages from here, or installed from terminal on 22.04+.

Pablo Bianchi
  • 15,657
user5950
  • 6,186
  • Adding to @user5950 's answer, the app is now called input-remapper, in case anyone is still searching about this, like me – Musickiller Dec 09 '22 at 19:17
  • While this works perfectly for my G502 Mouse i would like to know why i do need it to have my basic forward/back functionality working in ubuntu. This is beyond me. – Philipp Michalski Jan 22 '24 at 20:05