TransWikia.com

Logitech Marble Mouse - Linux Scroll Modifier Setup

Unix & Linux Asked by Peter L on December 18, 2020

In Linux, how do I setup a Logitech Marble Mouse so that the would-be ‘back’ button is changed to a scroll modifier? IE: Hold the ‘back’ button down and now the track ball controls scroll.

3 Answers

I use the following config (similar to @PeterL, but does not disable the back button)

/etc/X11/xorg.conf.d/10-libinput.conf

Section "InputClass"
     Identifier "Marble Mouse"
     MatchProduct "Logitech USB Trackball"
     Driver "libinput"
     Option "ScrollMethod" "button"
     Option "ScrollButton" "8"
     Option "AccelSpeed" "1"
     # Option "TransformationMatrix" "2.4 0 0 0 2.4 0 0 0 1"
EndSection

The commented TransformationMatrix allows to skip pixels and move faster, but I prefer to change the DPI as below instead.

  • Set a custom DPI through /etc/udev/hwdb.d/71-mouse-local.hwdb
# Logitech Marble Mouse
#id obtained by: mouse-dpi-tool  /dev/input/event4
mouse:usb:v046dpc408:name:Logitech USB Trackball:
# keep space below
 MOUSE_DPI=100@125

and then udevadm hwdb --update, udevadm control --reload-rules && udevadm trigger and unplug, plug mouse. The DPI of 100 may be too sensitive for some, you could replace by 200@125.

Answered by jherek on December 18, 2020

You can also use evdev driver. To do so add following to a new /usr/share/X11/xorg.conf.d/50-marble-mouse.conf

Section "InputClass"
        Identifier  "Marble Mouse"
        MatchProduct "Logitech USB Trackball"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "ButtonMapping" "1 2 3 4 5 6 7 8 9"
        Option "EmulateWheel" "true"
        Option "EmulateWheelButton" "8"
        Option "ZAxisMapping" "4 5"
        Option  "XAxisMapping" "6 7"
        Option  "Emulate3Buttons" "true"
EndSection

Above configuration works for me on Ubuntu 18.04 but it does not on Xubuntu 18.04 running on a ThinkPad R60. For the latter I have to use the libinput config posted above by Peter.

Answered by karlsebal on December 18, 2020

I'm using an Arch derivative (Antergos) and this config was derived from their Marble Mouse wiki page.

Add the following to the /usr/share/X11/xorg.conf.d/40-libinput.conf file...

# Section added for scroll with Marble Mouse
Section "InputClass"
    Identifier      "Marble Mouse"
    MatchProduct    "Logitech USB Trackball"
    Driver          "libinput"
    Option          "ButtonMapping" "1 2 3 4 5 6 7 0 9"
    Option          "ScrollMethod" "button"
    Option          "ScrollButton" "8"
    Option          "MiddleEmulation" "on"
EndSection

Note that the back button operation has been disabled because it would occasionally fire when trying to scroll.

Answered by Peter L on December 18, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP