GNOME Wayland – How to Change Trackball Scroll Method

gnomegnome-shelllibinputwayland

I like using libinput's on-button scrolling feature to make my trackball a scroll wheel when holding down BTN_BACK. The Arch Linux wiki describes how to configure this feature in Xorg. When I used sway, I was able to get the behaviour I wanted using the following configuration documented in sway-input(5):

input <identifier> {
  scroll_method on_button_down
  scroll_button BTN_BACK
}

I recently switched to GNOME on Wayland in order to try out a scrollable tiling window manager – PaperWM. But I can't figure out how to configure my scroll method in GNOME Shell. According to the Arch wiki, libinput's configurable options depend on the progress of your desktop environment's support for them, and I can't find anything relevant in GNOME Settings or GNOME Tweaks.

See also

Best Answer

This option can be configured (for trackballs only) using the scroll-wheel-emulation-button setting. By default this is set to 0, meaning that no button will turn the trackball into a scroll wheel. I experimented with a few different mouse buttons and found that button 5 was the most convenient for scrolling on my trackball:

gsettings set org.gnome.desktop.peripherals.trackball scroll-wheel-emulation-button 5

This worked immediately, without needing to reboot or restart my GNOME session, in GNOME Shell 3.36. The feature was added in GNOME 3.16 (March 2015).

Related Question