<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0040)http://www.xfree86.org/4.3.0/mouse7.html -->
<HTML><HEAD><TITLE>Configuration Examples</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY text=black vLink=#551a8b aLink=red link=blue bgColor=#efefef><A
href="http://www.xfree86.org/4.3.0/mouse.html"><EM>Mouse Support in
XFree86</EM></A> <B>:</B> <EM>Configuration Examples </EM><BR><B>Previous:</B>
<A href="http://www.xfree86.org/4.3.0/mouse6.html"><EM>Mouse Gallery
</EM></A><BR><B>Next:</B> <A
href="http://www.xfree86.org/4.3.0/mouse.html"><EM>Mouse Support in
XFree86</EM></A>
<HR noShade>
<H2><A name=39></A>7. Configuration Examples </H2>
<P>This section shows some example <CODE>InputDevice</CODE> section for popular
mice. All the examples assume that the mouse is connected to the PS/2 mouse
port, and the OS supports the PS/2 mouse initialization. It is also assumed that
<CODE>/dev/mouse</CODE> is a link to the PS/2 mouse port.</P>
<P>Logitech MouseMan+ has 4 buttons and a wheel. The following example makes the
wheel movement available as the button 5 and 6.</P>
<P>
<HR>
<PRE>Section "InputDevice"
        Identifier        "MouseMan+"
        Driver                "mouse"
        Option                "Device"        "/dev/mouse"
        Option                "Protocol"        "MouseManPlusPS/2"
        Option                "Buttons"        "6"
        Option                "ZAxisMapping"        "5 6"
EndSection
</PRE>
<HR>
<P></P>
<P>You can change button number assignment using the <CODE>xmodmap</CODE>
command AFTER you start the X server with the above configuration. You may not
like to use the wheel as the button 2 and rather want the side button (button 4)
act like the button 2. You may also want to map the wheel movement to the button
4 and 5. This can be done by the following command:</P>
<P><PRE>        xmodmap -e "pointer = 1 6 3 2 4 5"
</PRE>
<P></P>
<P>After this command is run, the correspondence between the buttons and button
numbers will be as shown in the following table.</P>
<P><PRE>Physical Buttons        Reported as:
------------------------------------
1 Left Button                 Button 1
2 Wheel Button                 Button 6
3 Right Button                 Button 3
4 Side Button                 Button 2
5 Wheel Negative Move         Button 4
6 Wheel Positive Move         Button 5
</PRE>
<P></P>
<P>For the MS IntelliMouse Explorer which as a wheel and 5 buttons, you may have
the following <CODE>InputDevice</CODE> section. </P>
<P>
<HR>
<PRE>Section "InputDevice"
        Identifier        "IntelliMouse Explorer"
        Driver                "mouse"
        Option                "Device"        "/dev/mouse"
        Option                "Protocol"        "ExplorerPS/2"
        Option                "Buttons"        "7"
        Option                "ZAxisMapping"        "6 7"
EndSection
</PRE>
<HR>
<P></P>
<P>The IntelliMouse Explorer has 5 buttons, thus, you should give "7" to the
<CODE>Buttons</CODE> option if you want to map the wheel movement to buttons (6
and 7). With this configuration, the correspondence between the buttons and
button numbers will be as follows:</P>
<P><PRE>Physical Buttons        Reported as:
------------------------------------
1 Left Button                 Button 1
2 Wheel Button                 Button 2
3 Right Button                 Button 3
4 Side Button 1                 Button 4
5 Side Button 2                 Button 5
6 Wheel Negative Move         Button 6
7 Wheel Positive Move         Button 7
</PRE>
<P></P>
<P>You can change button number assignment using <CODE>xmodmap</CODE> AFTER you
started the X server with the above configuration.</P>
<P><PRE>        xmodmap -e "pointer = 1 2 3 4 7 5 6"
</PRE>
<P></P>
<P>The above command will moves the side button 2 to the button 7 and make the
wheel movement reported as the button 5 and 6. See the table below.</P>
<P><PRE>Physical Buttons        Reported as:
------------------------------------
1 Left Button                 Button 1
2 Wheel Button                 Button 2
3 Right Button                 Button 3
4 Side Button 1                 Button 4
5 Side Button 2                 Button 7
6 Wheel Negative Move         Button 5
7 Wheel Positive Move         Button 6
</PRE>
<P></P>
<P>For the A4 Tech WinEasy mouse which has two wheels and 3 buttons, you may
have the following <CODE>InputDevice</CODE> section. </P>
<P>
<HR>
<PRE>Section "InputDevice"
        Identifier        "WinEasy"
        Driver                "mouse"
        Option                "Device"        "/dev/mouse"
        Option                "Protocol"        "IMPS/2"
        Option                "Buttons"        "7"
        Option                "ZAxisMapping"        "4 5 6 7"
EndSection
</PRE>
<HR>
<P></P>
<P>The movement of the first wheel is mapped to the button 4 and 5. The second
wheel's movement will be reported as the buttons 6 and 7.</P>
<P>The Kensington Expert mouse is really a trackball. It has 4 buttons arranged
in a rectangle around the ball.</P>
<P>
<HR>
<PRE>Section "InputDevice"
        Identifier "DLB"
        Driver "mouse"
        Option "Protocol" "ThinkingMousePS/2"
        Option "Buttons" "3"
        Option "Emulate3Buttons"
        Option "Device" "/dev/mouse"
        Option "DragLockButtons" "2 1 4 3"
EndSection
</PRE>
<HR>
In this example, button 2 is a drag lock button for button number 1, and button
4 is a drag lock button for button 3. Since button 2 is above button 1 and
button 4 is above button 3 in the layout of this trackball, this is reasonable.
<P></P>
<P>Because button 2 is being used as a drag lock, it can not be used as an
ordinary button. However, it can be activated by using the "Emulate3Buttons"
feature. However, some people my be unable to press two buttons at the same
time. They may prefer the following <CODE>InputDevice</CODE> section which
defines button 4 as a master drag lock button, and leaves button 2 free for
ordinary use.
<HR>
<PRE>Section "InputDevice"
        Identifier "MasterDLB"
        Driver "mouse"
        Option "Protocol" "ThinkingMousePS/2"
        Option "Buttons" "3"
        Option "Device" "/dev/mouse"
        Option "DragLockButtons" "4"
EndSection
</PRE>
<HR>
<P></P>
<HR noShade>
<A href="http://www.xfree86.org/4.3.0/mouse.html"><EM>Mouse Support in
XFree86</EM></A> <B>:</B> <EM>Configuration Examples </EM><BR><B>Previous:</B>
<A href="http://www.xfree86.org/4.3.0/mouse6.html"><EM>Mouse Gallery
</EM></A><BR><B>Next:</B> <A
href="http://www.xfree86.org/4.3.0/mouse.html"><EM>Mouse Support in
XFree86</EM></A> </BODY></HTML>