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 onlyExtraButton<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
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”.
Native button codes are needed. I expected these to follow the definitions from libinput, so I’m very confused as to why “back” is not 278. I determined by trial and error that it is 275. I’d be curious to find out why.
Next on the to-do list is to make this config per-device instead of global.