# two-scroll-wheel mouse

## Chymera

I have an A4tech mouse over here which has 2 scroll wheels on it. They both work (but sadly only for up-down scrolling) is there any way to assign one of them to up-down and the other to left-right scrolling?

Is it just a matter of "if there's a specific driver for my mouse", or is there something more to it?

----------

## NeddySeagoon

Chymera,

Find your  

```
Option "ZAxisMapping" 
```

line in xorg.conf. The first two numbers set the 'buttons' for up/down, the next two set the 'buttons' for left/right 

e.g. 

```
Option "ZAxisMapping" " 4 5 6 7"
```

Use xev to check your scroll wheel 'button' numbers

----------

## Chymera

how do I use xdev?

----------

## NeddySeagoon

Chymera,

```
emerge xev
```

give the xev command in a xterm of your choice.

Use the mouse in xevs' window and the terminal will show raw events likeButton

```
Press event, serial 30, synthetic NO, window 0x4000001,

    root 0x155, subw 0x4000002, time 3074254774, (39,32), root:(45,94),

    state 0x0, button 1, same_screen YES
```

That shows button 1 was pressed. Further down is the release event 

```
ButtonRelease event, serial 30, synthetic NO, window 0x4000001,

    root 0x155, subw 0x4000002, time 3074254894, (39,32), root:(45,94),

    state 0x100, button 1, same_screen YES
```

You will also have lots of MotionNotify events as you move the mouse in the xev window.

The key thing here is do you get the press/release events for your scroll wheels and any other non operating mouse controls?

----------

## Chymera

well I get buttons 4 and 5 for both wheels... what can I do ?

----------

## Chymera

bump

----------

## Rainmaker

Do you use the evdev driver?

Try that, otherwise, set something like "Buttons="9" in your xorg.conf (device section of your mouse).

See

http://wiki.archlinux.org/index.php/Get_All_Mouse_Buttons_Working

----------

## SiberianSniper

or see the gentoo wiki page on the same topic: http://gentoo-wiki.com/HOWTO_Advanced_Mouse

----------

## NeddySeagoon

Chymera,

Not all mouse protocols support more than 5 buttons.

Set the protocol to "Auto" in xorg.conf and restart Xorg

----------

## Chymera

```
Section "InputDevice"

    # generated from data in "/etc/conf.d/gpm"

    Identifier     "Mouse0"

    Driver         "mouse"

    Option         "Protocol"

    Option         "Device" "/dev/input/mice"

    Option         "Emulate3Buttons" "no"

    Option         "ZAxisMapping" "4 5 6 7"

EndSection
```

I believe this would be the appropriate section... so what and where do I add?

@rainmaker: how do I get evdev?

----------

## SiberianSniper

For evdev (which is what I use) you need three things.

First, it has to be compiled into the kernel or as a module.

```
Device Drivers  --->

  Input device support  --->

    <*> Event interface
```

Second, add this to /etc/make.conf and do an emerge -N world

```
INPUT_DEVICES="evdev"
```

Finally, modify the mouse section in /etc/X11/xorg.conf

```
Section "InputDevice"

        Identifier "Mouse0"

        Driver "evdev"

        Option "Name" "Logitech USB-PS/2 Optical Mouse"

EndSection

```

(You'll need to use another Name, which can be found in /proc/bus/input/devices

I think that's all there is to it.

----------

