Ubuntu/Linux disable extra Mouse Buttons Microsoft Comfort Mouse 4500 -

Ubuntu/Linux disable extra Mouse Buttons Microsoft Comfort Mouse 4500

I find it very annoying that this mouse has buttons on the side where you grip it and the left one goes back in the browser and the right one goes forward.  Imagine if you\'re filling out a form and hit it, most forms/websites have no protection against it.

Source: http://ubuntuforums.org/showthread.php?t=2065400

Here's how I fixed it with xinput, it\'s too bad there\'s no good standard GUI tool to set mouse buttons:

xinput list

This will show your input devices, in my case "10" was the case.

xinput list 10
Microsoft Microsoft® Comfort Mouse 4500    id=10    [slave  pointer  (2)]
    Reporting 5 classes:
        Class originated from: 10
        Buttons supported: 13
        Button labels: Button Left Button Middle Button Right Button Wheel Up Button Wheel Down Button Horiz Wheel Left Button Horiz Wheel Right Button Side Button Extra Button Unknown Button Unknown Button Unknown Button Unknown
        Button state:
        Class originated from: 10
        Keycodes supported: 248
        Class originated from: 10
        Detail for Valuator 0:
          Label: Abs X
          Range: -1.000000 - -1.000000
          Resolution: 1 units/m
          Mode: relative
        Class originated from: 10
        Detail for Valuator 1:
          Label: Abs Y
          Range: -1.000000 - -1.000000
          Resolution: 1 units/m
          Mode: relative
        Class originated from: 10
        Detail for Valuator 2:
          Label: Abs Gas
          Range: -1.000000 - -1.000000
          Resolution: 1 units/m
          Mode: relative

Solution

It is tedious but copy and paste the "Button labels" and put each one in a text file (that has numbered lines) and separate each "Button" at the beginning of each like this (this will make it easier to number each button you want and disable them).

  1. Button Left
  2. Button Middle
  3. Button Right
  4. Button Wheel Up
  5. Button Wheel Down
  6. Button Horiz Wheel Left
  7. Button Horiz Wheel Right
  8. Button Side
  9. Button Extra
  10. Button Unknown
  11. Button Unknown
  12. Button Unknown
  13. Button Unknown


xinput set-button-map 10 1 2 3 4 5 6 7 0 0 10 11 12 13
 

Note the "10" after "set-button-map" that corresponds to your device number/id.

Note the "0 0" after "7" corresponds to the two side buttons, you set 0 in place of the button number to disable it.


  • Lost connection to MySQL server during query [2013]
  • No package fuse-encfs available. yum
  • Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
  • No response from subprocess (whostmgr (whostmgr)): The subprocess exited with status 12 (ENOMEM).
  • ResourceManager[31705]: CRIT: Resource STOP failure. Reboot required!
  • htaccess modrewrite query string to another URL howto
  • bash script how to do wildcard string comparisons or matching
  • bash script test if directory exists
  • bash script check if file exists
  • bash script linux how to do a wildcard string comparison
  • Windows 2012 Server R2 Install Error "windows cannot find the microsoft license terms windows 2012 server install"
  • cPanel how to force reinstall rpms and fix packages and other problems caused by updates or duplicate rpms
  • kvm how to add secondary cdrom drive
  • Dell CS24SC Server Info
  • Dell CS10-F1D Server Info lspci Linux specs
  • Linux Kernel EDAC errors EDAC MC0: UE row 0, channel-a= 0 channel-b= 1 labels "-": NON-FATAL recoverable (Branch=0 DRAM-Bank=0 Buffer ID = 0 RDWR=Read RAS=0 CAS=0 NON-FATAL recoverable Err=0x800 (Non-Aliased Uncorrectable Patrol Data ECC))
  • Linux disable firmware prevents NIC/Ethernet from working phy0 -> rt2x00lib_request_firmware: Error - Failed to request Firmware.
  • VPN Account Buyers Guide and General Info
  • KVM/QEMU how to boot from direct kernel vmlinuz and initrd with networking
  • Flash slowing down your Firefox browser? Install Flashblock plugin