"Regular" mouse button remapping in KWin

I’m having a hard time switching to Wayland because I need to remap mouse buttons, specifically the Back and Middle buttons. I have a Kensington Expert trackball, and button functions are somewhat arbitrary out of the box.

The ButtonRebinds feature in kcminputrc almost covers what I need, but the code in buttonbindsfilter.cpp clearly will map only ExtraButton<x> inputs, which means I can’t rebind the MiddleMouse button.

I’m also not sure if it’s possible to bind a mouse button as the action here.

I wonder why this rebinding feature is restricted to “extra” buttons?

Additionally, it seems the rebinding in global, not per-device. Whereas all the other configuration is per-device. This feels like an oversight :thinking:

Any thoughts?

I’m afraid this isn’t implemented yet; see 475879 – Re-Bind Additional Mouse Buttons menu does not accept bindings to other mouse buttons

I think this may have been intentional, but I agree it should be changed to per-device. It’s on my list of “things to make happen once I find time for it eventually, unless someone else gets there first”.

1 Like

I’d love to scratch this itch myself, and I’ll try to make some time for it, but I am in the wrong lifestage for having spare time :smile: I’ll race you!