reconfigure mouse button

on 12.3 / KDE 4.10, I have the problem that the middle mouse button (=clicking the wheel) is broken.

the mouse however has some more buttons that I usually don’t use.
is it possible to configure one of the additional buttons to behave like the middle mouse button? how?

I bet it can be done, my guess would be that it should get defined in /etc/X11/xorg.conf.d/ 11-mouse.conf.
In the examples in the file I see:


       Option  "EmulateWheel"  "on"
        Option  "EmulateWheelButton"    "2"
       Option  "EmulateWheel"  "on"
       Option  "EmulateWheelButton"    "2"





AFAICS that should be it. You’d have to find out which button # would work. There may be a command that reads which button is clicked, but I wouldn’t know.

The “EmulateWheel”/“EmulateWheelButton” options are the wrong ones in this case IIUIC.
That would emulate a wheel, i.e. you press the mouse button and move the mouse, and programs will think you moved the mouse wheel.

See “man evdev” for details.

But I think this option would be the one the OP is looking for:

       **Option "ButtonMapping" "string"
**              Sets the button mapping for this device. The mapping is a space-
              separated  list  of  button mappings that correspond in order to
              the physical buttons on the device (i.e. the first number is the
              mapping  for  button 1, etc.). The default mapping is "1 2 3 ...
              32". A mapping of 0 deactivates the button. Multiple buttons can
              have  the  same  mapping.  For example, a left-handed mouse with
              deactivated scroll-wheel would use a mapping of "3  2  1  0  0".
              Invalid  mappings  are  ignored and the default mapping is used.
              Buttons not specified in the user's mapping use the default map-
              ping.

Or, since this is about the middle mouse button, you could also use the “Emulate3Buttons” option. Then if you press the left and the right button at the same time, it is registered as the middle button.

thanks, that’s what I was looking for.

now a probably stupid question:
how do I make changes to /etc/X11/xorg.conf.d/ 11-mouse.conf effective?

I still didn’t manage to make configuration changes work. I assume /etc/X11/xorg.conf.d/11-mouse.conf is the right place??? but changes to it don’t show any effect. what am I doing wrong?

Well, in 11-mouse.conf are settings specific to certain mice. You have to add the option to the right section for your mouse. (Xorg.0.log should tell which section is applied on your system, if any)
But I guess it would be better to add it to 10-evdev.conf, the section with

Identifier "evdev pointer catchall"

That one should be used in any case I think.

Or, even better, create a new file in /etc/X11/xorg.conf.d, but I can’t tell you how to do that correctly in this case.

do you have a /etc/X11/xorg.conf file. I believe setting there may override those in /etc/X11/xorg.conf.d

also you need to log out log back in for changes to take effect

…took me a while with other bussiness…

I don’t have a a /etc/X11/xorg.conf.

I assume 10-evdev.conf is not the right place, since it should apply to a specific mouse and not to all.

I had a look in Xorg.0.log, but could’t guess from there which section to make the changes to if it concerns a bluetooth mouse (I have the problem on two computers)
on the desktop I identified the type via lsusb. but how can I identify for the bluetooth mouse?

is there a howto somewhere?

Unfortunately xord.conf set up is almost magic.

xorg.conf Options

here is a starting point.

wolfi is right, insert the lines below the bolded one:


Section "InputClass"
        Identifier "evdev pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
**        Driver "evdev"**
EndSection