Mouse middle-button scrolling in LinuxMint / Ubuntu

In LinuxMint 21-22, the middle button triggers a Paste operation. This article shows how to reconfigure it to scroll the screen on mouse up / down movement.

Here are two ways to do it. Both methods require knowing the identifier of the mouse. To see your xinput identifiers, type xinput

If you have a Logitech USB optical mouse, then one of them will have the identifier Logitech USB Optical Mouse

Temporary / non-persistent

From the command-line, type:

xinput set-prop 'Logitech USB Optical Mouse' "libinput Scroll Method Enabled" 0, 0, 1
xinput set-prop 'Logitech USB Optical Mouse' "libinput Button Scrolling Button Lock Enabled" 1

Persistent

Create a file called 41-logimouse.conf in directory /usr/share/X11/xorg.conf.d/ with the following contents:

Section "InputClass"
        Identifier "Logitech USB Optical Mouse"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "ScrollButton" "2"
        Option "ScrollMethod" "button"
        Option "ScrollButtonLock" "true"
        Option "NaturalScrolling" "true"
EndSection
10 / 2024