Hairy Cats and mice and FreeBSD

Garrett Cooper youshi10 at
Fri Jan 26 03:35:52 UTC 2007

Hash: SHA1

RW wrote:
> On Sat, 20 Jan 2007 19:36:38 -0800
> "Kevin Downey" <redchin at> wrote:
>> Xorg -configure now puts:
>> Option     "ZAxisMapping" "4 5 6 7"
>> in the mouse section by default, which is all I've ever needed to make
>> the scrollwheel work
>  I have 
> Option     "ZAxisMapping" "4 5"
> I think you only need the other two values on a mouse with a second
> scroll wheel. 

The handbook/FAQ--although good--doesn't apply properly in all cases.
For instance, my mouse was confusing to configure since I applied
improper arguments and ran the wrong commands. So, based on my
experience you shouldn't add anything to rc.conf related to moused
--except moused_enable="YES"--unless things don't work for you.

Also, depending on your mouse you'll have to change ZAxisMapping to meet
your needs. For instance, my Wireless MS Intellimouse Explorer 3.0
contains a 1) left and right side buttons, an 2) up-down scrollwheel, 3)
left-right scrollwheel feature (looked carefully at the scrollwheel and
it can be moved left to right), 4) and 2 thumb buttons.
For me to properly setup my mouse I'd have to do:

Option     "ZAxisMapping" "4 5 6 7"

in xorg.conf, but I opt for just using the scrollwheel, so the following
is legitimate:

Option     "ZAxisMapping" "4 5"

How did I figure out what did what? xev--a wonderful program packaged
with the monolithic (not modular, i.e. version <7.0) version of one determine what buttons do what by scrolling and
pressing each input to one's content.

For instance:

1. Invokes xev from xterm (data is output to stdout).

2. Moves mouse pointer inside box for X11 widget that comes up.

3. Scrolls middle mouse button up without moving the mouse or pressing
anything else. Output similar to this is seen:

ButtonRelease event, serial 30, synthetic NO, window 0x2000001,
    root 0x141, subw 0x2000002, time 70460667, (36,51), root:(536,81),
    state 0x800, button 4, same_screen YES

The important part is..
    state 0x800, --> button 4 <--, same_screen YES
.. as it tells you which mouse button does the scroll up function.

4. Repeat 3. but instead scroll button down.

5. Use value obtained from  3. and 4. as follows in xorg.conf for
setting ZAxisMapping:

Option     "ZAxisMapping" "{value from 3.} {value from 4.}"

6. If you have a mouse with side to side ZAxis rotation, putting the
value obtained for the left rotation after "{value from 4.}", and the
right rotation after the value for the left rotation.

Hope this helps. This should remain correct as long as doesn't
change their mouse input configuration (driver), and as long as your
mouse is detected and configured correctly by moused, the steps I listed
above should work for enabling your scroll functions. There's a new
setup for 7.x that uses something called evdev which is a built-in
input driver in the Linux kernel, and it sounds like it's a pain to deal

If you want to enable your thumb buttons, there's always imwheel.. See
<> for a good
couple paragraphs on how to set that up to your liking.

- -Garrett
Version: GnuPG v2.0.1 (FreeBSD)
Comment: Using GnuPG with Mozilla -


More information about the freebsd-questions mailing list