# Mouse buttons not properly recognized.



## crshd (Feb 25, 2012)

I'm having some issues with my Logitech MX1100. On this model, the scroll wheel tilts left and right for horizontal scrolling, but these buttons are recognized as buttons 8 and 9, which are actually the two thumb buttons. They are supposed to be 6 and 7.

So now, every time I want to scroll horizontally, I end up going back/forward in my browser's history. Right now I switched the functions of button 8/9 to 6/7 via xmodmap, so that I have horizontal scrolling, but of course that also changed the thumb buttons to 6/7.

I've googled around a bit, and tried all kinds of xorg.conf settings to get it to use the right button codes, but so far to no avail.  Everything used to work fine with Linux, right out of the box.


----------



## wblock@ (Feb 25, 2012)

Have you added the extra buttons to the mouse entry in xorg.conf?  ZAxisMapping?  See [pman=4x]mousedrv[/pman].


----------



## crshd (Feb 26, 2012)

Yes, I did. Currently my xorg.conf says


```
Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/sysmouse"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection
```

I also tried setting ButtonMapping to "1 2 3 6 7 8 9 10", which didn't work either.


----------



## crshd (Feb 26, 2012)

Eh, no edit function...

I'm not very experienced with that stuff, but actually I'm guessing it's not Xorg's problem, but something further down, on the driver level. Whatever I try to change in my xorg.conf, the tilting function of the wheel always has the same button codes as the two thumb buttons.


----------



## SirDice (Feb 27, 2012)

Not all buttons may be mapped. They could also be mapped to some other numbers.

Have a look with x11/xev and see what buttons are recognized.


----------



## rayne (Feb 28, 2012)

crshd said:
			
		

> Eh, no edit function...
> 
> I'm not very experienced with that stuff, but actually I'm guessing it's not Xorg's problem, but something further down, on the driver level. Whatever I try to change in my xorg.conf, the tilting function of the wheel always has the same button codes as the two thumb buttons.



Have the same issue with Logitech MX400 and MX620.

Linux seems to get around this with the "HWHEELRelativeAxisButtons" option for its "evdev" mouse driver: https://help.ubuntu.com/community/Logitech_MX610


----------



## rayne (Mar 1, 2012)

Is it possible to use a different input mouse driver for Xorg under FreeBSD? Such as evdev for linux: http://www.x.org/archive/X11R7.5/doc/man/man4/evdev.4.html


----------



## SirDice (Mar 2, 2012)

rayne said:
			
		

> Such as evdev for linux: http://www.x.org/archive/X11R7.5/doc/man/man4/evdev.4.html


evdev is strictly Linux.


----------



## rayne (Mar 5, 2012)

Fwiw,

Mouse: Logitech MX400 Performance Laser Mouse (USB)


```
Action         Button #

Left Click     1
Right Click    2
Middle Click   3
Scroll Up      4
Scroll Down    5
Tilt Left      6
Tilt Right     7
Thumb Down     8
Thumb Up       9
```

Xorg: Overrides button 6 with 8 and overrides button 7 with 9

Tried xmodmap, imwheel, xbindkeys. But these do not fix override issue.

Don't think there is any way around this without adjusting driver/protocol source code.


----------



## rayne (Mar 7, 2012)

SirDice said:
			
		

> evdev is strictly Linux.



Is it feasible through FreeBSD's "Linux Binary Compatibility" per http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/linuxemu.html?


----------

