Scrolling With Your Trackball in 2023 and libinput
A bit of a shorter post, but I wanted to share my findings in case this helps someone down the line with my niche annoying problem. I recently bought myself a trackball, after using a mouse for years 1, and my one major complaint has been scrolling. Someone in the /r/trackballs Discord server pointed me towards “marblescroll”, which allows you to scroll with your trackball when you hold a button. I daily drive Linux, however, so I had to fend for myself a bit. After some searching, I found the EmulateWheel
Xorg.conf
option on the Arch wiki. Unfortunately, this doesn’t seem to work with modern libinput
; it seems to have been replaced with ScrollMethod
. This is the configuration I came up with:
/etc/X11/xorg.conf.d/20-trackball.conf
Section "InputClass"
Identifier "Trackball scroll"
MatchProduct "BT5.0 Mouse" # Optional, just matches my trackball
MatchIsPointer "on"
Driver "libinput"
Option "ScrollMethod" "button"
Option "ScrollButton" "2" #This can be any button you like; 2 is my scroll wheel button.
Option "MiddleEmulation" "on" # Optional, I just use it because I have rid myself of middle click.
EndSection
-
Trackball fans settle down; this isn’t about ergonomics, but rather about giving my cat space to sit on my desk. ↩︎