Remapping Mouse Buttons on Ubuntu Lucid

For ergonomic reasons (discussed previously) I like a side button on my mouse to act as a middle button instead.  Unfortunately there still doesn’t seem to be an “easy” way to remap mouse buttons in Linux, and what’s more the method of changing such settings seems to keep changing.  To achieve the same results in Ubuntu Lucid, I added an Xorg configuration fragment at /usr/lib/X11/xorg.conf.d/20-logitech-mx1100.conf:

Section "InputClass"
        Identifier "Logitech MX1100 button remap"
        MatchProduct "Logitech USB Receiver"
        MatchDevicePath "/dev/input/event*"
        Option "ButtonMapping" "1 2 3 4 5 6 7 2 9 10"
EndSection

As with the previous method, xinput list should give you the product string to use for MatchProduct.

  • givrix

    That's a coincidence, I just bought the same mouse, coming in the bundle cordless wave pro, and after a few days I started to be pissed off with the middle click that often drives into scrollwheel actions…
    So I had the very similar idea that the “hidden button” under the thumb should do quite the trick. But I was suspicious about this solution as it'd been told hal and udev were cleaner solutions. So my forums digs conducted me to this xorg snippet thing that is the last hope for Lucid xorg tweaks… kind of a regression !
    So I post here my solution as yours totally disabled all my inputs… arguing a driver is missing

    Section “InputClass”
    Identifier “Logitech MX1100 button remap”
    MatchProduct “Logitech USB Receiver”
    MatchDevicePath “/dev/input/event*”
    Driver “evdev”
    Option “ButtonMapping” “1 2 3 4 5 6 7 8 9 2″
    EndSection

  • http://www.alanbriolat.co.uk/ Alan Briolat

    Strange that we should have different results with the same method on the same version of Xorg, but your solution is more explicit and probably more correct.

  • givrix

    I really wonder why you don't need the driver line, do you already have a mouse section in your xorg.conf ? Mine is really minimal.
    I'm also perplex about this matching as the keyboard goes with exactly the same name than the mouse…
    There's this option too : MatchIsPointer “on”
    it may be useful for some others…

  • http://www.alanbriolat.co.uk/ Alan Briolat

    Mine isn't so minimal – it's generated by the AMD Catalyst tool – but it has nothing referring to any input devices. There are however other files in /usr/lib/X11/xorg.conf.d/ that do contain Driver “evdev”, but as far as I'm aware they're there by default…