PDA

View Full Version : Change mouse button mapping



skolnick
27th July 2008, 11:18 PM
Hi!

I am using Fedora 9 x86 and I use a Microsoft Comfort optical mouse 3000 (http://www.microsoft.com/hardware/mouseandkeyboard/productdetails.aspx?pid=041). The mouse works, scrolling and everything. The problem is that I would like to map the thumb button (xev identifies it as button number 9) to middle-click. I have searched, and ended with the following configuration in my xorg.conf:


Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
Option "ButtonMapping" "1 9 3 4 5 6 7 8 2 10 11 12 13"
EndSection

However, this does not work. One more interesting thing: this is an excerpt from my /var/log/Xorg.0.log


(**) Option "Protocol" "ExplorerPS/2"
(**) Mouse0: Device: "/dev/input/mice"
(**) Mouse0: Protocol: "ExplorerPS/2"
(**) Option "CorePointer"
(**) Mouse0: always reports core events
(**) Option "Device" "/dev/input/mice"
(**) Option "Emulate3Buttons" "no"
(**) Option "ZAxisMapping" "4 5"
(**) Mouse0: ZAxisMapping: buttons 4 and 5
(**) Option "ButtonMapping" "1 9 3 4 5 6 7 8 2 10 11 12 13"
(**) Mouse0: Buttons: 13
(**) Mouse0: Sensitivity: 1
(II) evaluating device (Mouse0)
(II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE)
(II) evaluating device (Keyboard0)
(II) XINPUT: Adding extended input device "Keyboard0" (type: KEYBOARD)
(II) Mouse0: ps2EnableDataReporting: succeeded
(II) config/hal: Adding input device Macintosh mouse button emulation
(II) LoadModule: "evdev"

(II) Loading /usr/lib/xorg/modules/input//evdev_drv.so
(II) Module evdev: vendor="X.Org Foundation"
compiled for 0.0.0, module version = 1.0.0
Module class: X.Org XInput Driver
ABI class: X.Org XInput driver, version 2.1
(**) Macintosh mouse button emulation: always reports core events
(**) Macintosh mouse button emulation: Device: "/dev/input/event0"
(II) Macintosh mouse button emulation: Found x and y relative axes
(II) Macintosh mouse button emulation: Found mouse buttons
(II) Macintosh mouse button emulation: Configuring as mouse
(II) XINPUT: Adding extended input device "Macintosh mouse button emulation" (type: MOUSE)
(II) config/hal: Adding input device Microsoft Microsoft Optical Mouse with Tilt Wheel
(**) Microsoft Microsoft Optical Mouse with Tilt Wheel: always reports core events
(**) Microsoft Microsoft Optical Mouse with Tilt Wheel: Device: "/dev/input/event2"
(II) Microsoft Microsoft Optical Mouse with Tilt Wheel: Found x and y relative axes
(II) Microsoft Microsoft Optical Mouse with Tilt Wheel: Found mouse buttons
(II) Microsoft Microsoft Optical Mouse with Tilt Wheel: Configuring as mouse
(II) XINPUT: Adding extended input device "Microsoft Microsoft Optical Mouse with Tilt Wheel" (type: MOUSE)
(II) Open ACPI successful (/var/run/acpid.socket)
(II) NVIDIA(0): Setting mode "nvidia-auto-select"
(II) Mouse0: ps2EnableDataReporting: succeeded
[gpulido@hades ~]$

notice that for some reason, it detects 13 buttons on my mouse, even tough it only has 8 (right,middle, left, 4 for scrolling and the thumb one). I have tried everything I've found, but it always configures the mouse with the default settings. Any ideas? which software can I use to tweak the mouse behavior?

Thanks!

PabloTwo
28th July 2008, 02:29 AM
I'm not sure how much I can help you here, but one thing to note:

Do not include the same numbers in both "ZAxisMapping" and "ButtonMapping". Whatever numbers are included in "ZAxisMapping", should not appear in "ButtonMapping".