I have a Logitech Marble Mouse USB Trackball. The button mapping puts
"back" on the small left button, which I find inconvenient. Under X11 I
remap this to "middle" using
xinput set-button-map "Logitech USB Trackball" "1 8 3 4 5 6 7 2 9"
or an appropriate Xorg configuration snippet.
However with Wayland there doesn't seem to be a command line way to
achieve this; https://wiki.archlinux.org/index.php/Libinput suggests I
should be using the appropriate graphical tool. Under GNOME I think this
is gnome-control-center but I can't see any way to remap buttons using
it. gnome-tweak-tool doesn't seem to offer anything either.