# Mouse - Fourth Button = Middle Button



## Ruler2112 (Jul 23, 2012)

I recently bought a PS/2 Logitech Mouseman ball & wheel mouse for my work box.  (I was using an optical Logitech which worked flawlessly for years.  Many would consider a mechanical mouse to be a downgrade, but this one fits my overly-large hands better.   Wish they made optical mice like this... much easier on the carpel tunnel after working for many hours.  )  The mouse has 4 buttons - left, right, wheel click, and a side button.  On my home windoze system, it shows functions as a 'back' button in my web browser (and configurable as a separate option in games), but I've thus far been unable to get it to do anything but duplicate the middle-button action in FreeBSD.

Differences from home:

PS/2 mouse connected to a tower instead of USB to a laptop
FreeBSD 8 instead of XP
8-port KVM connected here


I've searched around and found many people with the same type of problems with all sorts of mice with more than 3 buttons, but few solutions and none of those I've found have worked thus far.  One of the best is from this forum, but I've still been unable to get it working 100%.



Here are some observations:

The moused daemon MUST NOT be running when I start X/KDE or the mouse does nothing.  I've tried both /dev/sysmouse and /dev/psm0 in /etc/X11/xorg.conf and the behavior in X is the same - pointer in the middle of the screen and nothing I do to the mouse affects it.  This is the same as when I was using the original optical mouse.

The mouse works perfectly with the exception of the fourth (side) button.  The side button does the same as clicking the wheel - middle click.

I powered down all 8 systems and removed power from the KVM for ~15 seconds to be sure it wasn't something cached in it - no difference than when simply unplugging the old (optical) mouse and plugging the new (mechanical) one in.

I've played with /etc/X11/xorg.conf about 2 dozen times, restarting X between edits, and am in the same spot now as I was when I started.  I've tried changing the Buttons, ButtonMapping, ZAxisMapping, and even tried following directions on using xmodmap for a mouse with more than 3 buttons, even though I do not really understand what it does.

Using [cmd=]xinput test-xi2[/cmd] shows the following when clicking either the middle or side buttons.  The output is identical for either button, which explains why the side button acts like a middle click.  Does nothing to help me figure out how to fix it though.


```
Ã¢Â¡ Virtual core pointer                         id=2    [master pointer  (3)]
Ã¢   Ã¢Â³ Virtual core XTEST pointer               id=4    [slave  pointer  (2)]
Ã¢   Ã¢Â³ PS/2 Mouse                               id=6    [slave  pointer  (2)]
Ã¢Â£ Virtual core keyboard                        id=3    [master keyboard (2)]
    Ã¢Â³ Virtual core XTEST keyboard              id=5    [slave  keyboard (3)]
    Ã¢Â³ AT Keyboard                              id=7    [slave  keyboard (3)]
<snip>
EVENT type 15 (RawButtonPress)
    device: 2
    detail: 2
    valuators:

EVENT type 4 (ButtonPress)
    device: 6 (6)
    detail: 2
    flags:
    root: 1377.70/69.31
    event: 141.70/41.31
    buttons:
    modifiers: locked 0x10 latched 0 base 0 effective: 0x10
    group: locked 0 latched 0 base 0 effective: 0
    valuators:
    windows: root 0x1ad event 0x3400001 child 0x0
EVENT type 4 (ButtonPress)
    device: 2 (6)
    detail: 2
    flags:
    root: 1377.70/69.31
    event: 141.70/41.31
    buttons:
    modifiers: locked 0x10 latched 0 base 0 effective: 0x10
    group: locked 0 latched 0 base 0 effective: 0
    valuators:
    windows: root 0x1ad event 0x3400001 child 0x0
EVENT type 5 (ButtonRelease)
    device: 6 (6)
    detail: 2
    flags:
    root: 1377.70/69.31
    event: 141.70/41.31
    buttons: 2
    modifiers: locked 0x10 latched 0 base 0 effective: 0x10
    group: locked 0 latched 0 base 0 effective: 0
    valuators:
    windows: root 0x1ad event 0x3400001 child 0x0
EVENT type 5 (ButtonRelease)
    device: 2 (6)
    detail: 2
    flags:
    root: 1377.70/69.31
    event: 141.70/41.31
    buttons: 2
    modifiers: locked 0x10 latched 0 base 0 effective: 0x10
    group: locked 0 latched 0 base 0 effective: 0
    valuators:
    windows: root 0x1ad event 0x3400001 child 0x0
<snip>
```



Any ideas how I could get the 4th button to be it's own button?


----------



## Ruler2112 (Jul 23, 2012)

Nevermind - found the problem.  Turns out that my IOGear GCS138 8-port KVM does not support turning off mouse emulation.  The mouse talks to the KVM, which in turn talks to the computer.  The KVM expects a 3-button mouse, so that's what it emulates.  If it supported disabling mouse emulation, the mouse could talk directly to the computer and there wouldn't be a problem, but since it doesn't, I'm SOL unless I buy a new KVM and all new (proprietary) cables.  Plus, the new model KVM won't work with some of the old servers anyways because it's USB only.  I'm really disappointed in this - the KVM is freakin awesome otherwise and I had plans on buying one for home in the near future.  Good support people, just not a feature that's available in the product and no plans to add it.  

Sorry for reporting this here - hardware problem that has nothing to do with BSD.


----------

