# Mouse mapping for xfree86

## cbrese

I just got my versapoint usb wireless keyboard/mouse combo to work, but the mouse configured right.

If I push the pad to the right it moves the pointer up, if I push it to the left the pointer moves down.  The left button moves the pointer to the right and the right button moves the pointer to the left.

How can I find the correct config for my mouse?  I know I need to change the axis values, but I don't know what to change them to.

----------

## Sven Vermeulen

What does your current ZAxisMapping say? It should have the values "4 5".

If that is what it has, try "1 2" and "2 3" and "3 4" etc... you know, play them  :Smile: 

----------

## cbrese

I've tried lots of stuff for the ZAxisMapping option.  The best so far is this

```

Option "ZAxisMapping" "X"

```

Now I can ge full movment, but it kind of upside down and rotated.

It would be nice if there was some kind of tool to help with this.

----------

## cbrese

I still haven't found a solution.  

Does anyone have an idea or maybe a pointer to where I can get some more info on how to configure a non-standard mouse for xfree86.

----------

## cbrese

I'm still trying to get my versapoint working.

I've found some interesting info:

It looks like the versapoint doesn't support HID fully so I have to use the HIDBP modules for the mouse and the keyboard.

Using the HIDBP modules I can get the keyboard to work perfectly and with a funky config I can get the mouse pointer to work.  

The only thing that doesn't work is the mouse buttons.

Here's what I had the do in XFree86Config to get the pointer to work.

```

Section "InputDevice"

        Identifier  "Mouse0"

        Driver      "mouse"

        Option      "Protocol" "IMPS/2"

        Option      "Device" "/dev/usbmouse"

        Option     "ZAxisMapping" "X"

        Option      "FlipXY" "true"

        Option      "InvX" "true"

        Option      "InvY" "false"

        Option      "Buttons" "5"

EndSection

```

I've tried setting the XAxisMapping and YAxisMaping to lot of different combinations of number, but nothing seems to help.

Can anyone think of something else for me to try?

I tested an other wireless usb mouse keyboard combination and it worked, but I like the layout of the versapoint better so I really want to get it to work.

----------

## hadees

has anyone found a solution to this? what drivers should i use for this keyboard?

----------

## cbrese

I never got it working correctly, so I just gave and got a new wireless keyboard.

The model I got used the old ps2 mouse/keyboard ports so it was easy to get working, but the range kind of sucks.

----------

## ben_dash

It sounds sooooo close!

I was planning on using my Versapoint RF for my Gentoo XBox, which only has USB.  I don't want to have to buy the LiteOn IR keyboard and use a Ps/2 to USB adapter.

What a PITA!

Oh well....  :Sad: 

Which other wireless USB keyboard and mouse did you try which worked?

Hmmm... I just googled some more and I may have a solution to get the mouse to work using xmodmap:

http://www.x.org/X11R6.8.1/doc/mouse7.html

This also looks promising:

http://gentoo-wiki.com/HOWTO_Mouse_Nav_Buttons

Fingers crossed, I'll try this this weekend and report the results back...

----------

## ben_dash

Well... that was easy!  I didn't have to configure anything, it just worked.

I plugged in the Versapoint RF USB receiver and both the mouse and the keyboard work fine with zero configuration.  I also had a PS/2 keyboard and mouse plugged in, the mouse being a cheap generic one with a scroll wheel and so I had Emulate3Button disabled so I didn't check to see if that worked.  Note that all 4 mouse buttons work, three are all set up as the left button and one is the right, just as you'd expect.

In case I have a peculiar verion that just happens to work here's my serial number:

```
KF040202088
```

I'm using 2.6.9-gentoo-r4 dev kernel, I know it's a little out of date but I've been busy with my MythTV server.

Here's the mouse and keyboard sections of xorg.conf:

```
Section "InputDevice"

        Identifier  "Keyboard0"

        Driver      "kbd"

EndSection

Section "InputDevice"

        Identifier  "Mouse0"

        Driver      "mouse"

#       Option      "Protocol" "auto"

        Option      "Protocol" "IMPS/2"

        Option      "Device" "/dev/mouse"

        Option      "ZAxisMapping" "4 5"

        Option      "Emulate3Button" "no"

EndSection
```

I was going to post the output from xev but it's 20kb so if you really want it I'll email it to anyone who is interested.

What a turn around!  I was pretty annoyed when I discovered that the 150 dollar keyboard that I spent weeks researching, albeit a couple of years ago, was unlikely to work in Linux and now everything is good!

----------

## ben_dash

Now that I have my xBox set up and running xorg I've found that the Versapoint RF mouse is not working for me.  It works fine on my other Gentoo box as specified above, however, on the xBox I get the following behavior:

Mouse up = cursor does nothing

Mouse down = cursor does nothing

Mouse left = cursor goes up fast

Mouse right = cursor goes down fast

Left thumb button = cursor goes right

Right thumb button = cursor goes right (faster than left thumb button)

Left finger button = cursor goes right

Right finger button = cursor goes right

I'll let you know if I manage to get it working.

The xBox joystick is working as a mouse perfectly.

----------

## ben_dash

Just to let you know, I changed from kernel 2.4.31 to 2.6.12.5 and that solved the mouse problems with the versapoint rf

----------

