X11 Mouse/Legacy Monolithic/Individual Configurations
From Gentoo Linux Wiki
[edit] XOrg 6.8 or Lower and/or PS/2 Mice
[edit] Logitech MX310
If you have a Logitech MX310, change the xorg.conf file to read
| File: /etc/X11/XF86Config Or /etc/X11/xorg.conf |
... Section "InputDevice" Identifier "Mouse1" Driver "mouse" Option "Protocol" "ExplorerPS/2" Option "Device" "/dev/input/mice" Option "Buttons" "7" Option "Emulate3Buttons" "false" Option "ZAxisMapping" "4 5" Option "ButtonMapping" "1 2 3 6 7" EndSection ... |
Note: The window-switch button below the scroll wheel is not included. It isn't recognized without using the evdev driver.
[edit] Logitech MX400 and MX615
without tilt wheel
| File: /etc/X11/xorg.conf |
... Section "InputDevice" Identifier "Mouse1" Driver "mouse" Option "Protocol" "ExplorerPS/2" Option "Device" "/dev/input/mice" Option "Buttons" "7" Option "ZAxisMapping" "4 5" Option "Emulate3Buttons" "false" Option "ButtonMapping" "1 2 3 6 7 8" EndSection ... |
[edit] Logitech MX500
| File: /etc/X11/xorg.conf |
# for xorg-x11 7.0-r1, this worked for me (MX500 in PS/2 port)
Section "InputDevice"
Identifier "MX500"
Driver "evdev"
Option "Device" "/dev/input/event1"
Option "ButtonMapping" "1 3 2 4 5 6 7 8 9 10"
EndSection
|
or an alternative:
| File: /etc/X11/xorg.conf |
Section "InputDevice"
Identifier "mx500"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/input/mice"
Option "Buttons" "7"
Option "ZAxisMapping" "6 7"
EndSection
|
#xmodmap -e "pointer = 1 2 3 8 9 4 5 6 7 10 11" <--- edit: I only counted 10 buttons on my MX500 ... o.O note: Position - Number -> Button - Action in Firefox etc 1-1 -> Left Button - Select 2-2 -> Wheel/Middle Button - Paste selection 3-3 -> Right Button - Context menu 4 ? 5 ? 6-4 -> Scroll wheel & button up 7-5 -> Scroll wheel & button down 8-6 -> Back Thumb Button - Backward 9-7 -> Front Thumb Button - Forward 10 ? 11 ?
[edit] Logitech MX600
This mouse seems to only work with the first 9 buttons (mouse actually has 12) when plugged into a PS/2 port (I recommend PS/2 if you got the MX600 as part of the MX3000 Cordless desktop kit, otherwise less than half of the extended keyboard keys will work in USB mode due to a bug in the 2.6 series kernel USB keyboard driver). The buttons that do not work are the Zoom-, Zoom+ and 100% buttons. The following is a working X.Org 7.0+ configuration:
| File: /etc/X11/xorg.conf |
Section "InputDevice"
Identifier "Mouse0"
Driver "evdev"
Option "Dev Name" "ImExPS/2 Logitech Explorer Mouse"
Option "Device" "/dev/input/event2"
Option "Buttons" "12"
Option "ZAxisMapping" "4 5"
EndSection
|
The default mapping looks like this:
| Button/Action | Assigned Button Number | Default action in Firefox and others |
|---|---|---|
| Index finger button | 1 | Standard "Left" Click |
| Click scroll wheel | 2 | Standard Middle-Click (Firefox enters "autoscroll" mode) |
| Middle or ring finger button (depends how you hold the mouse) | 3 | Standard "Right" Click (context menu usually) |
| Rotate wheel away from you | 4 | Scroll Up |
| Rotate wheel toward you | 5 | Scroll Down |
| Tilt scroll wheel toward thumb | 6 | Go forward in session history (in Firefox) |
| Tilt scroll wheel away from thumb | 7 | Go back in session history |
| Thumb-side rear button | 8 | ?? |
| Thumb-side front button | 9 | ?? |
| Zoom+ | n/a | n/a |
| Zoom- | n/a | n/a |
| 100% | n/a | n/a |
Because the history forward and history backward functions will seem backwards to some people, use the following xmodmap command to fix it:
# xmodmap -e "pointer = 1 2 3 4 5 7 6 8 9"
If you are like me and would rather use the thumb side buttons to go forward and backwards, then use the following (the one furthest away from your body will go forward in the history, the one closest will go back, reverse the 6 and 7 below if you want the opposite):
# xmodmap -e "pointer = 1 2 3 4 5 8 9 7 6"
[edit] Logitech MX610
| File: /etc/X11/xorg.conf |
Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "CorePointer" Option "Emulate3Buttons" "no" Option "Device" "/dev/input/mice" Option "Protocol" "auto" Option "Buttons" "12" Option "ZAxisMapping" "4 5" Option "ButtonMapping" "1 2 3 9 8 6 7 10 11 12" Option "Resolution" "800" EndSection |
Volume+, Volume-, VolumeMute, Email and IM buttons may not work. Email and IM lights require HIDDEV support in the kernel and a userspace utility such as mx610hack.
[edit] Microsoft Intellimouse Explorer 3.0
Microsoft IntelliMouse Explorer 3.0 USB and PS/2 Compatible (I did this w/ the little green USB -> ps/2 adapter)
| File: /etc/X11/XF86Config Or /etc/X11/xorg.conf |
... Section "InputDevice" Identifier "Mouse1" Driver "mouse" Option "Protocol" "ExplorerPS/2" Option "SendCoreEvents" "true" # Not sure if this line is needed ?? Option "Device" "/dev/input/mice" Option "Buttons" "4 5" # side buttons scroll up/down Option "ZAxisMapping" "6 7" # wheel moves forward/back in the browser EndSection ... |
FYI: This was the only way I could manage to get xev to even recognize the 2 side buttons on the mice at the same time that it recognized the wheel movements. Notice that the buttons now scroll the mouse, and the wheel moves forward/back (next/back) in a browser. To fix this I had to remap the mouse buttons by adding the following line to my startup script. (read below on which file this is for you)
xmodmap -e "pointer = 1 2 3 6 7 4 5"
Kaste: What version of Xorg is that? I had those issues with an intellimouse explorer 4.0 as well when using 6.8 (actually they were probably worse because it has two wheel directions) but they went away when using 7.0 and it still works under 7.1
Metatinara: I had to do my mapping a little differently with Xorg 7.1.
xmodmap -e "pointer = 1 2 3 8 9 4 5 6 7"
This resolved a difference I am having with my side buttons being recognized as 8 and 9 instead of 4 and 5. I am using the same xorg.conf as the previous entry and I have my mouse plugged in via USB.
[edit] Logitech Wireless Optical
I found this from the Xorg documentation. It works for Logitech Wireless Optical and makes the thumb button a browser back button and the scrollwheel to work in modular xorg without the need to use xmodmap.--Rakshasa 13:24, 29 March 2006 (GMT)
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "CorePointer"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Buttons" "6"
Option "ButtonMapping" "1 2 3 6 4 5"
EndSection
The following is not the correct way to use the button mapping in XOrg 7 according to the Xorg 7.0 documentation. You have X buttons, not including the wheel up/down, only the wheel click. In the case of my IMExplorer, 2 side buttons, left, right, and wheel click... 5 buttons. Set buttons to 5. Set your wheel number with the ZAxis mapping. Then do not use those numbers in the button mapping, only the 5 buttons. This replaces the need for xmodmap. XOrg 7.2 may be different, who knows there's no online XOrg 7.2 documentation. In any case, the following works:
| File: /etc/X11/xorg.conf |
... Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" Option "CorePointer" Option "Device" "/dev/psaux" Option "Protocol" "ExplorerPS/2" Option "Buttons" "5" Option "ZAxisMapping" "4 5" Option "ButtonMapping" "1 2 3 6 7" EndSection ... |
[edit] Logitech MX700
Option "ZAxisMapping" "4 5"
Option "ButtonMapping" "1 2 3 8 9 4 5 6 7 10 11"
Putting this in the mouse section with the standard setup after migrating to modular worked for me. Works here too.
[edit] A4Tech with Two Wheels (WOP-35)
I have a A4Tech WOP-35 mouse with two scrolls and two side buttons. No matter what I wrote in xorg.conf I couldn't get it so that the side buttons were assigned numbers 6 and 7. It always gave them 8 and 9 but this is unwanted since browsers like Opera or Firefox use buttons 6 and 7 for navigating back and forward. So you can't avoid the xmodmap thing. I put it into ${kdedir}/share/config/kdm/Xstartup so that all users have the same setup:
xmodmap -e "pointer = 1 2 3 4 5 8 9 6 7 10 11"
| File: /etc/X11/xorg.conf |
... Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "ExplorerPS/2" Option "Device" "/dev/input/mice" Option "ZAxisMapping" "4 5" Option "Buttons" "7" EndSection ... |
Now both scroll buttons do scroll the same and side buttons are used for navigation, no more settings required.
[edit] Kubuntu Breezy Users
Under KDE xmodmap is unnecessary. Change your xorg.conf file to match this:
| File: /etc/X11/xorg.conf |
...
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "Buttons" "7"
Option "ZAxisMapping" "4 5"
EndSection
...
|
Doing so will allow your wheel to still scroll documents / browser windows and your third and fourth mouse buttons (thumb buttons) to perform back / forward in browser windows without the mucking about in startup scripts. It's also portable across all users on a system, which may be important if multiple users share a computer. Finally, it's a cinch to set up / undo / redo since all of the changes are in one place.
I haven't tested this on my Gentoo box - it doesn't run X. But it may provide an easier solution there too.
NOTE: This solution appears near identical to the previous solution, not sure how CorePointer automagically changes the order the buttons are mapped. Take this solution with a grain of salt. If the previous xorg.conf requires xmodmap and this one does not, please post back here.
[edit] Bluetooth Mice
If you have a bluetooth mouse and all these extra buttons are not working, check out the kernel patches at The Official Linux Bluetooth Protocol Website
[edit] Trust GM-4200 Predator
| File: /etc/X11/xorg.conf |
... Section "InputDevice" Driver "mouse" Identifier "Mouse[1]" Option "Buttons" "7" Option "Device" "/dev/input/mice" Option "Name" "USB Mouse" Option "Protocol" "explorerps/2" Option "Vendor" "Sysp" Option "ZAxisMapping" "6 7" EndSection ... |
#xmodmap -e "pointer = 1 2 3 8 9 4 5 6 7 10 11" note: Position - Number -> Button - Action in Firefox etc 1-1 -> Left Button - Select 2-2 -> Wheel/Middle Button - Paste selection 3-3 -> Right Button - Context menu 4 ? 5 ? 6-4 -> Scroll wheel & button up 7-5 -> Scroll wheel & button down 8-6 -> Back Thumb Button - Backward 9-7 -> Front Thumb Button - Forward 10 ? 11 ?
[edit] Trust DS-3200 Wireless Optical
| File: /etc/X11/xorg.conf |
... Section "InputDevice" Identifier "Mouse1" Driver "mouse" Option "Name" "MOSART Semi. Wireless Keyboard & Mouse" Option "Buttons" "7" Option "Device" "/dev/input/mice" Option "Protocol" "explorerps/2" Option "Vendor" "Sysp" Option "ZAxisMapping" "6 7" EndSection ... |
#xmodmap -e "pointer = 1 2 3 6 7 8 9 4 5 10 11"
