I migrated from X to Wayland today and found a problem: My mouse (a logitech M560) has 9 buttons (left, middle, right, wheel up, wheel down, wheel left, wheel right, and two buttons for the thumb). With Xorg I used xmodmap to remap one of the thumb buttons as the middle button, because it is easier to use. When I changed to Wayland I tried to do the same with "xinput set-button-map", but I was unable. Xinput says that my mouse has 10 buttons (but in fact it has only 9). When I use "xinput test" to see which event number is assigned to each button, it says that they map to 1, 2, 3, 4, 5, 6, 7, 10 and 11, being 10 and 11 the two thumb buttons. The problem is that "xinput get-button-map" returns "1 2 3 4 5 6 7 8 9 10" (that's why I say that it says that my mouse has 10 buttons), but if I try to remap the thumb button that emits the event 11 to be used as the middle button, it doesn't work: it is not possible to remap the "11 button" to emit the "2 event" ("middle button"); this is: "xinput set-button-map X 1 11 3 4 5 6 7 8 9 10 2" (being X the mouse device, of course) doesn't work because I'm trying to remap the 11th button, the one that xinput doesn't detect.
https://who-t.blogspot.com.au/2016/12/the-future-of-xinput-xmodmap-setxkbmap.html in short: xmodmap/xinput have no real effect under wayland. any remapping would only work in X applications, not in wayland-native ones. You need to remap the button using the compositor's facilities (if any).
Oh, ok... I supposed that xmodmap was the tool for Xorg, but xinput was the equivalent for libinput... Ok, thanks.
But wait... I remapped one of the recognized buttons in my mouse, and the remap works in wayland applications... Specifically, I remapped the thumb button that can be remapped to the middle button, and the paste function works in a gnome terminal or in Gedit :-?
I honestly don't know how this would work. xinput only talks to the x server which updates its internal button mapping. In theory it's possible to have this configuration forwarded to the compositor to apply across Wayland applications, but we don't have a protocol for that. So... No idea what's going on there.
Ok, I found the reason: I don't know what's happening with my Debian system, but when I ask it to run Gnome Shell under Wayland, it still launches the X version. That's why it worked. If I manually launch gnome shell from a tty with --wayland, and try to use xinput to remap the mouse, it doesn't work. Sorry.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.