Ubuntu – How to fix the middle mouse button being recognized as left mouse button


I've updated my system to 10.10 and since then my "middle mouse button" (on my laptop, under touchpad) is recognized as my "left mouse button". If I open xev, I can see that both, my "left and middle mouse button" are being referred to as "button 1".

Can anybody me to fix this problem and make my middle mouse button behave like a middle mouse button again?

Best Answer

https://help.ubuntu.com/community/ManyButtonsMouseHowto#Remapping%20buttons documents how to remap the buttons on a mouse. To quote it:

Some pointing devices have a strange button mapping, so need some tweaking to match X's perception of things. Such tweaking can be performed at runtime with xinput - find your device in xinput list and run xinput set-button-map 1 2 3 6 7, replacing those numbers with your required button mapping. You might be able to find it by searching for other people with the same hardware, or you might need to play around and see what works.

Here is the xinput(1) manual page explanation of the --set-button-map option:

--set-button-map device map_button_1 [map_button_2 [...]]

Change the button mapping of device. The buttons are  specified
in  physical  order  (starting with button 1) and are mapped to
the logical button provided. 0 disables a button.  The  default
button mapping for a device is 1 2 3 4 5 6 etc.

This should allow you to re-map the middle mouse button so that it is properly detected as the middle mouse button.

Related Question