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.


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"

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


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"

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.