Logitech M570 / MX Ergo – scroll the window vertically or horizontally with the trackball ball

On Linux, we can create a configuration files for devices and add them to XOrg configuration folder. After that we will be able to use mouse trackball ball + additional button to scroll page vertically or horizontally.

File content for Logitech M570:

Section "InputClass"
  Identifier "M570"
  MatchProduct "Logitech M570"
  Driver "libinput"
  Option "ScrollMethod" "button"
  Option "ScrollButton" "9"
EndSection

File content for Logitech MX Ergo:

Section "InputClass"
  Identifier "MX Ergo"
  MatchProduct "Logitech MX Ergo"
  Driver "libinput"
  Option "ScrollMethod" "button"
  Option "ScrollButton" "9"
EndSection

In my case, I saved those contents to files:

52-logitech-m570.conf
53-logitech-mx_ergo.conf

And copied them to folder: /usr/share/X11/xorg.conf.d/

sudo cp 52-logitech-m570.conf /usr/share/X11/xorg.conf.d/
sudo cp 53-logitech-mx_ergo.conf /usr/share/X11/xorg.conf.d/

After that, I installed Debian package ‘xinput’ using command:

sudo apt install xinput

And executed command to list my devices to get their IDs

xinput list

I used ID’s for devices (21 for m570 and 9 for MX Ergo) and executed commands:

xinput set-prop <DEVICE ID> "libinput Scroll Method Enabled" 0, 0, 1
xinput set-prop <DEVICE ID> "libinput Button Scrolling Button"

After that, I was able to use a mouse ball to scroll a page vertically and horizontally using ball and button no 1:

Source: https://help.ubuntu.com/community/Logitech_Marblemouse_USB

Leave a Reply

Your email address will not be published. Required fields are marked *