You are not logged in.

#1 2020-11-15 19:46:48

ben_shirazi
Member
Registered: 2020-11-15
Posts: 3

[SOLVED] Mouse button remapping (udev?)

Greetings!

So, scroll wheel clicking sucks. My mouse has these nice thumb buttons, so I want one of those to take over the role of wheel-clicking -- i.e. when I thumb-click, I want the O/S to act as if I clicked the wheel.

I cannot for the life of me figure out how. What's worse, I had it working in Ubuntu, but no idea how I made it work back then. I'm guessing that udev/hwdb played a role, but searching the interwebs, all I can find is how to remap keyboard_btn's, nothing on mice.

Wayland/Sway -- any pointers, anyone?

Thanks in advance!

Last edited by ben_shirazi (2020-11-16 21:22:44)

Offline

#2 2020-11-15 22:10:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,736

Re: [SOLVED] Mouse button remapping (udev?)

This needs to be provided by your wayland compositor, see https://github.com/swaywm/sway/issues/3960 for potential pointers.

Offline

#3 2020-11-16 20:32:44

ben_shirazi
Member
Registered: 2020-11-15
Posts: 3

Re: [SOLVED] Mouse button remapping (udev?)

V1del wrote:

This needs to be provided by your wayland compositor, see https://github.com/swaywm/sway/issues/3960 for potential pointers.

Thanks V1del! I tried the above (had remnants of it from my configuration backup), but it has problems registerering button_release.

Couldn't this functionality be provided more elegantly by some lower layer, though? The last guy in the Github thread hints at a possible solution with hwdb, which is the one I was sort of fishing for smile Doesn't anyone have something like that working? All I see out there (e.g [1]) only deals in keyboards.

[1] https://wiki.thurstylark.com/Keyboard%20Mapping.html

Offline

#4 2020-11-16 21:20:52

ben_shirazi
Member
Registered: 2020-11-15
Posts: 3

Re: [SOLVED] Mouse button remapping (udev?)

So *this* turned out to be the solution:

# cat /etc/udev/hwdb.d/90-razer-300.hwdb
evdev:input:b0003v1038p1710*
 KEYBOARD_KEY_90004=btn_middle

Where 90004 was found by evtest, and btn_middle was somewhat guesswork -- works, though. I thought that KEYBOARD_KEY should be something else when we were talking rodents, but apparently not.

Thanks for the push V1del smile

Last edited by ben_shirazi (2020-11-16 21:21:55)

Offline

Board footer

Powered by FluxBB