Bug 68372

Summary: incorrect button mapping when multiple mouses present
Product: kcontrol Reporter: Verdi March <cincaipatron>
Component: kcminputAssignee: Patrick Dowler <dowler>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: matija, michiel
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Verdi March 2003-11-16 15:49:24 UTC
Version:            (using KDE KDE 3.1.4)
Installed from:    SuSE RPMs
OS:          Linux

The mouse mapping (left-handed) is applied only to the
first/core mouse. The first mouse is ps/2, the second
one (which map incorrectly) is a usb mouse.

.kde/share/config/kcminputrc
============================
[Mouse]
Acceleration=3
MouseButtonMapping=LeftHanded


XF86Config
==========
Section "InputDevice"
  Driver       "mouse"
  Identifier   "Mouse[0]"
  Option       "ButtonNumber" "5"
  Option       "Device" "/dev/mouse"
  Option       "Name" "Autodetection"
  Option       "Protocol" "imps/2"
  Option       "Vendor" "Sysp"
  Option       "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
  Driver       "mouse"
  Identifier   "Mouse[1]"
  Option       "ButtonNumber" "5"
  Option       "Device" "/dev/usbmouse"
  Option       "Name" "Autodetection"
  Option       "Protocol" "imps/2"
  Option       "Vendor" "Sysp"
  Option       "ZAxisMapping" "4 5"
EndSection

Section "ServerLayout"
  Identifier   "Layout[all]"
  InputDevice  "Keyboard[0]" "CoreKeyboard"
  InputDevice  "Mouse[0]" "CorePointer"
  InputDevice  "Mouse[1]" "SendCoreEvents"
...
Comment 1 Thiago Macieira 2003-11-16 15:59:35 UTC
*** Bug 68376 has been marked as a duplicate of this bug. ***
Comment 2 Thiago Macieira 2003-11-16 16:00:04 UTC
*** Bug 68377 has been marked as a duplicate of this bug. ***
Comment 3 Thiago Macieira 2003-11-16 16:00:26 UTC
*** Bug 68374 has been marked as a duplicate of this bug. ***
Comment 4 Thiago Macieira 2003-11-16 16:00:48 UTC
*** Bug 68373 has been marked as a duplicate of this bug. ***
Comment 5 Michiel Leegwater 2006-02-15 17:48:22 UTC
Like the original reporter I have 2 mouses. Since one is the Touchpad(synaptics) of my laptop and the other an addition usb mouse(logitech wheel). Since I usually attach and detach I would not like to set my USB mouse as CorePointer, resulting in a mouse that cannot be set left-handed. This problem is quite annoying since also frequently use another system where I can use the first mouse left-handed and am therefore very used to using the mouse left handed.
Comment 6 Matija Šuklje 2008-11-12 16:14:52 UTC
I have pretty much the same problem.

My mouse has 9 buttons of which button 2 ("middle button") is physically missing due to a two-speed wheel.

To fix this in X I use this 'xorg.conf' setting:
---[snip]---
Section "InputDevice"
        ### Logitech NX80 (laserska)
        Identifier      "Mouse"
        Driver  "evdev"
        #Option "Name"                  "Logitech USB Receiver"
        Option  "Device"                "/dev/input/event4"
        Option  "Resolution"            "1000"
        Option  "ButtonMapping"         "1 0 3 4 5 6 7 8 2"
EndSection
Section "InputDevice"
        Identifier      "Synaptics"
        Driver          "synaptics"
        Option  "Device"                "/dev/input/event6"
        Option  "Protocol"              "auto-dev"
        Option  "LeftEdge"              "1700"
        Option  "RightEdge"             "5300"
        Option  "TopEdge"               "1700"
        Option  "BottomEdge"            "4200"
        Option  "FingerLow"             "25"
        Option  "FingerHigh"            "30"
        Option  "MaxTapTime"            "180"
        Option  "MaxTapMove"            "220"
        Option  "VertScrollDelta"       "100"
        Option  "MinSpeed"              "0.09"
        Option  "MaxSpeed"              "0.18"
        Option  "AccelFactor"           "0.0015"
        Option  "SHMConfig"             "true"
        Option  "Repeater"              "/dev/ps2mouse"
        ### KSynaptics prav da rab UseShm
        Option  "UseShm"                "true"
EndSection
---[snap]---

I tested this solution (ButtonMapping depends on evdev 2.1) on both KDE and Fluxbox and got these results:
* in KDM it works flawlessly
* in Fluxbox it works flawlessly
* in KDE it ignores it and overrides it (so I have to manually use 'xmodmap' to enforce it again)

In my opinion, it would be enough to just have KControl handle mouse mappings as an option (and not by default that cannot be turned off!) — just like it's optional for KControl to handle keyboard layouts.

P.S. To some extent (at least towards the end) Bug 34362 seems to have some similarity to this one.
Comment 7 Matija Šuklje 2009-02-16 18:54:26 UTC
I managed to solve this problem by removing all input-related settings from 'xorg.conf' and migrating them to HAL's '*.fdi' files.

I wrote a lenghtly HOWTO on my homepage: http://matija.suklje.name/?q=node/56

I think this could be marked as solved (UPSTREAM?).
Comment 8 Matija Šuklje 2010-03-08 18:13:58 UTC
*bump* I still think this could be closed because of UPSTREAM.
Comment 9 Andrew Crouthamel 2018-09-04 18:07:12 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years so I am closing this bug. Kcontrol has been replaced by System Settings in Plasma. Please give the latest version of that a try, and open a new bug in "systemsettings" if you continue to have an issue. Thank you!