Home | History | Annotate | only in /xsrc/external/mit/xf86-input-mouse/dist
Up to higher level directory
NameDateSize
aclocal.m420-Jun-2023445.5K
ChangeLog20-Jun-202396K
compile11-Nov-20227.2K
config.guess20-Jun-202348.8K
config.h.in11-Nov-20224.9K
config.sub20-Jun-202335K
configure20-Jun-2023621.3K
configure.ac20-Jun-20233.2K
COPYING20-Jun-20237.1K
depcomp11-Nov-202223K
include/19-Feb-2026
INSTALL22-Jul-201515.4K
install-sh11-Nov-202215K
ltmain.sh11-Nov-2022325.2K
Makefile.am05-Jun-20131.6K
Makefile.in11-Nov-202230K
man/19-Feb-2026
missing11-Nov-20226.7K
README11-Nov-202239.1K
src/19-Feb-2026
xorg-mouse.pc.in05-Mar-2017221

README

      1   Mouse Support in xf86-input-mouse
      2   Original version written by Kazutaka Yokota for XFree86 on 17 December 2002
      3   Updated by Alan Coopersmith for X.Org releases
      4   ____________________________________________________________
      5 
      6   Table of Contents
      7 
      8 
      9   1. Introduction
     10   2. Supported Hardware
     11   3. OS Support for Mice
     12      3.1 Summary of Supported Mouse Protocol Types
     13      3.2 BSD/OS
     14      3.3 FreeBSD
     15      3.4 FreeBSD(98)
     16      3.5 Interactive Unix
     17      3.6 Linux
     18      3.7 Linux/98
     19      3.8 LynxOS
     20      3.9 NetBSD
     21      3.10 NetBSD/pc98
     22      3.11 OpenBSD
     23      3.12 OS/2
     24      3.13 SCO
     25      3.14 Solaris
     26      3.15 SVR4
     27      3.16 PANIX
     28 
     29   4. Configuring Your Mouse
     30   5. xorg.conf Options
     31      5.1 Buttons
     32      5.2 ZAxisMapping
     33      5.3 Resolution
     34      5.4 Drag Lock Buttons
     35 
     36   6. Mouse Gallery
     37      6.1 MS IntelliMouse (serial, PS/2)
     38      6.2 MS IntelliMouse Explorer (PS/2, USB)
     39      6.3 Kensington Thinking Mouse and Kensington Expert Mouse (serial,
     40          PS/2)
     41      6.4 Genius NetScroll (PS/2)
     42      6.5 Genius NetMouse and NetMouse Pro (serial, PS/2)
     43      6.6 Genius NetScroll Optical (PS/2, USB)
     44      6.7 ALPS GlidePoint (serial, PS/2)
     45      6.8 ASCII MieMouse (serial, PS/2)
     46      6.9 Logitech MouseMan+ and FirstMouse+ (serial, PS/2)
     47      6.10 IBM ScrollPoint (PS/2)
     48      6.11 8D ScrollMouse (serial, PS/2)
     49      6.12 A4 Tech 4D mice (serial, PS/2, USB)
     50 
     51   7. Configuration Examples
     52 
     53 
     54   ______________________________________________________________________
     55 
     56   1.  Introduction
     57 
     58 
     59   This document describes mouse support in the xf86-input-mouse driver
     60   for the Xorg X server.   This driver is mainly used on non-Linux
     61   operating systems such as BSD & Solaris, as modern Linux systems use
     62   the xf86-input-evdev or xf86-input-libinput drivers instead.
     63 
     64   Mouse configuration has often been mysterious task for novice users.
     65   However, once you learn several basics, it is straightforward to write
     66   the mouse "InputDevice" section in the xorg.conf file by hand.
     67 
     68 
     69   2.  Supported Hardware
     70 
     71 
     72   The xf86-input-mouse driver supports four classes of mice: serial,
     73   bus and PS/2 mice, and additional mouse types supported by specific
     74   operating systems, such as USB mice.
     75 
     76 
     77      Serial mouse
     78         The serial mouse was once the most popular pointing device for
     79         PCs.  There have been numerous serial mouse models from a number
     80         of manufactures.  Despite the wide range of variations, there
     81         have been relatively few protocols (data format) with which the
     82         serial mouse talks to the host computer.
     83 
     84         The modern serial mouse conforms to the PnP COM device
     85         specification so that the host computer can automatically detect
     86         the mouse and load an appropriate driver.  The X server supports
     87         this specification and can detect popular PnP serial mouse
     88         models on most platforms.
     89 
     90 
     91      Bus mouse
     92         The bus mouse connects to a dedicated interface card in an
     93         expansion slot.  Some video cards, notably those from ATI, and
     94         integrated I/O cards may also have a bus mouse connector.  Some
     95         bus mice are known as `InPort mouse'.
     96 
     97         Note that some mouse manufacturers have sold a package including
     98         a serial mouse and a serial interface card.  Don't confuse this
     99         type of products with the genuine bus mouse.
    100 
    101 
    102      PS/2 mouse
    103         They are sometimes called `Mouse-port mouse'.  The PS/2 mouse was
    104         common for a generation after serial mice, and most laptops still
    105         use the PS/2 protocol for built-in pointer devices.
    106 
    107         The PS/2 mouse is an intelligent device and may have more than
    108         three buttons and a wheel or a roller.  The PS/2 mouse is
    109         usually compatible with the original PS/2 mouse from IBM
    110         immediately after power up.  The PS/2 mouse with additional
    111         features requires a specialized initialization procedure to
    112         enable these features.  Without proper initialization, it
    113         behaves as though it were an ordinary two or three button mouse.
    114 
    115 
    116      USB mouse
    117         USB (Universal Serial Bus) ports are present on most modern
    118         computers. Several devices can be plugged into this bus,
    119         including mice and keyboards.
    120 
    121         This driver includes support for USB mice on some systems.
    122 
    123   Many mice nowadays can be used both as a serial mouse and as a PS/2
    124   mouse, or as both a PS/2 and a USB mouse.  They have logic to distinguish
    125   which interface it is connected to.  However, a mouse which is not
    126   marketed as compatible with both mouse interfaces lacks this logic and
    127   cannot be used in such a way, even if you can find an appropriate adapter
    128   with which you can connect the mouse to a different format port.
    129 
    130   This driver supports a mouse with a wheel, a roller or a knob.  Its
    131   action is detected as the Z (third) axis motion of the mouse.  As the
    132   X server or clients normally do not use the Z axis movement of the
    133   pointing device, a configuration option, "ZAxisMapping", is provided
    134   to assign the Z axis movement to another axis or a pair of buttons
    135   (see below).
    136 
    137 
    138   3.  OS Support for Mice
    139 
    140 
    141 
    142   3.1.  Summary of Supported Mouse Protocol Types
    143 
    144 
    145                                   Protocol Types
    146                   serial     PnP     BusMouse    PS/2   Extended PS/2
    147   OS platforms   protocols  serial   protocol  protocol  protocols
    148                             "Auto"  "BusMouse"  "PS/2"   "xxxPS/2"    USB
    149   -------------------------------------------------------------------------
    150   BSD/OS            Ok        ?         ?         ?         ?          ?
    151   FreeBSD           Ok        Ok        Ok        Ok        SP*1       SP*1
    152   FreeBSD(98)       Ok        ?         Ok        NA        NA         ?
    153   Interactive Unix  Ok        NA        ?*1       ?*1       NA         ?
    154   Linux             Ok        Ok        Ok        Ok        Ok         ?
    155   Linux/98          Ok        ?         Ok        NA        NA         ?
    156   LynxOS            Ok        NA        Ok        Ok        NA         ?
    157   NetBSD            Ok        Ok        Ok        SP*1      SP*1       SP*1
    158   NetBSD/pc98       Ok        ?         Ok        NA        NA         NA
    159   OpenBSD           Ok        Ok        Ok        Ok*1      Ok*1       Ok*1
    160   SCO               Ok        ?         SP*1      SP*1      NA         ?
    161   Solaris           Ok        NA*1      ?*1       Ok        Ok         SP*1
    162   SVR4              Ok        NA*1      SP*1      SP*1      NA         ?
    163   PANIX             Ok        ?         SP*1      SP*1      NA         ?
    164 
    165   Ok: support is available,  NA: not available, ?: untested or unknown.
    166   SP: support is available in a different form
    167 
    168   *1 Refer to the following sections for details.
    169 
    170 
    171 
    172   3.2.  BSD/OS
    173 
    174   No testing has been done with BSD/OS.
    175 
    176 
    177   3.3.  FreeBSD
    178 
    179   FreeBSD supports the "SysMouse" protocol which must be specified when
    180   the moused daemon is running in versions 2.2.1 or later.
    181 
    182   When running the mouseddaemon, you must always specify the
    183   /dev/sysmouse device and the "SysMouse" protocol to the X server,
    184   regardless of the actual type of your mouse.
    185 
    186   FreeBSD versions 2.2.6 or later include the kernel-level support for
    187   extended PS/2 mouse protocols and there is no need to specify the
    188   exact protocol name to the X server.  Instead specify the "PS/2" or
    189   "Auto" protocol and the X server will automatically make use of the
    190   kernel-level support.
    191 
    192   In fact, "Auto" protocol support is really efficient in these
    193   versions.  You may always specify "Auto" to any mouse, serial, bus or
    194   PS/2, unless the mouse is an old serial model which doesn't support
    195   PnP.
    196 
    197   FreeBSD versions 2.2.5 or earlier do not support extended PS/2 mouse
    198   protocols ("xxxPS/2").  Always specify the "PS/2" protocol for any
    199   PS/2 mouse in these versions regardless of the brand of the mouse.
    200 
    201   FreeBSD versions 3.1 or later have support for USB mice.  Specify the
    202   "Auto" protocol for the /dev/ums0 device.  (If the moused daemon is
    203   running for the USB mouse, you must use /dev/sysmouse instead of
    204   /dev/ums0 as explained above.) See the ums(4) manual page for details.
    205 
    206 
    207   3.4.  FreeBSD(98)
    208 
    209   The PS/2 mouse is not supported.
    210 
    211 
    212   3.5.  Interactive Unix
    213 
    214   The PnP serial mouse support (the "Auto" protocol) is not supported
    215   for the moment.
    216 
    217   The bus mouse and PS/2 mouse should be supported by using the
    218   appropriate device drivers.  Use /dev/mouse for the "BusMouse"
    219   protocol and /dev/kdmouse for the "PS/2" protocol.  These protocols
    220   are untested but may work.  Please send success/failure reports to
    221   <mailto:michael.rohleder (a] stadt-frankfurt.de>
    222 
    223 
    224   3.6.  Linux
    225 
    226   All protocol types should work.
    227 
    228 
    229   3.7.  Linux/98
    230 
    231   The PS/2 mouse is not supported.
    232 
    233 
    234   3.8.  LynxOS
    235 
    236   The PnP serial mouse support (the "Auto" protocol) is disabled in
    237   LynxOS, because of limited TTY device driver functionality.
    238 
    239 
    240   3.9.  NetBSD
    241 
    242   NetBSD 1.3.x and former does not support extended PS/2 mouse protocols
    243   ("xxxPS/2").  The PS/2 mouse device driver /dev/pms emulates the bus
    244   mouse.  Therefore, you should always specify the "BusMouse" protocol
    245   for any PS/2 mouse regardless of the brand of the mouse.
    246 
    247   The "wsmouse" protocol introduced in NetBSD 1.4 along with the wscons
    248   console driver is supported. You need to run binaries compiled on
    249   NetBSD 1.4 to have support for it though. Use "/dev/wsmouse0" for the
    250   device. Refer to the wsmouse(4) manual page for kernel configuration
    251   information.
    252 
    253   This driver also provides support for USB mice. See the ums(4) manual
    254   page for details.
    255 
    256 
    257   3.10.  NetBSD/pc98
    258 
    259   The PS/2 mouse is not supported.
    260 
    261 
    262 
    263   3.11.  OpenBSD
    264 
    265   The raw PS/2 mouse device driver /dev/psm0 uses the raw PS/2 mouse
    266   protocol.
    267 
    268   OpenBSD 2.2 and earlier does not support extended PS/2 mouse protocols
    269   ("xxxPS/2") . Therefore, you should specify the "PS/2" protocol for
    270   any PS/2 mouse regardless of the brand of the mouse.
    271 
    272   OpenBSD 2.3 and later support all extended PS/2 mouse protocols.  You
    273   can select the "Auto" protocol for PnP PS/2 mice or any specific
    274   extended ("xxxPS/2") protocol for non PnP mice.
    275 
    276   There is also a cooked PS/2 mouse device driver /dev/pms0 which
    277   emulates the bus mouse. Specify the "BusMouse" protocol for any PS/2
    278   mouse regardless of the brand of the mouse when using this device.
    279 
    280   XFree86 3.3.6 support USB mice on OpenBSD 2.6 and later though the
    281   generic Human Interface Device (hid) /dev/uhid*. Select the "usb"
    282   protocol and the /dev/uhid* instance corresponding to your mouse as
    283   the device name.
    284 
    285 
    286   3.12.  OS/2
    287 
    288   X11R7.5/OS2 always uses the native mouse driver of the operating
    289   system and will support any type of pointer that the OS supports,
    290   whether it is serial, bus mouse, or PnP type.  If the mouse works
    291   under Presentation Manager, it will also work under X11R7.5/OS2.
    292 
    293   Always specify "OSMouse" as the protocol type.
    294 
    295 
    296   3.13.  SCO
    297 
    298   The bus and PS/2 mouse are supported with the "OSMouse" protocol type.
    299 
    300   The "OSMouse" may also be used with the serial mouse.
    301 
    302 
    303   3.14.  Solaris
    304 
    305   Testing has been done with Solaris 10 and 11.
    306 
    307   On Solaris 10 1/06 and later versions with "virtual mouse" support,
    308   all PS/2 and USB mice connected to the system can be accessed via the
    309   /dev/mouse device using the VUID protocol, including USB mice plugged
    310   in after the X server is started. On older releases or to address mice
    311   individually, specific devices and protocols may be used.
    312 
    313   Logitech and Microsoft bus mice have not been tested, but might work
    314   with the /dev/logi and /dev/msm devices.  Standard 2 and 3 button PS/2
    315   mice work with the "PS/2" protocol type and the /dev/kdmouse device.
    316   USB mice work with the "VUID" protocol type and the /dev/mouse device.
    317   The PnP serial mouse support via the "Auto" protocol has been tested
    318   and does not work. The "Auto" protocol can however detect PS/2 and USB
    319   mice correctly.
    320 
    321   Additional USB mice can be connected using the "VUID" protocol type
    322   and the appropriate "/dev/usb/hid" device with the
    323        Option "StreamsModule" "usbms"
    324   line included in the associated "InputDevice" section.
    325 
    326 
    327 
    328   3.15.  SVR4
    329 
    330   The bus and PS/2 mouse may be supported with the "Xqueue" protocol
    331   type.
    332 
    333   The "Xqueue" may also be used with the serial mouse.
    334 
    335   The PnP serial mouse support (the "Auto" protocol) is not tested.
    336 
    337 
    338   3.16.  PANIX
    339 
    340   The PC/AT version of PANIX supports the bus and PS/2 mouse with the
    341   "Xqueue" protocol type.  The PC-98 version of PANIX supports the bus
    342   mouse with the "Xqueue" protocol type.
    343 
    344 
    345   4.  Configuring Your Mouse
    346 
    347 
    348   Before editing the xorg.conf file to set up mouse configuration, you
    349   must identify the interface type, the device name and the protocol
    350   type of your mouse.  Blindly trying every possible combination of
    351   mouse settings will lead you nowhere.
    352 
    353   The first thing you need to know is the interface type of the mouse
    354   you are going to use.  It can be determined by looking at the
    355   connector of the mouse.  The serial mouse has a D-Sub female 9- or
    356   25-pin connector.  The bus mice have either a D-Sub male 9-pin
    357   connector or a round DIN 9-pin connector.  The PS/2 mouse is equipped
    358   with a small, round DIN 6-pin connector.  USB mice have a thin
    359   rectangular connector.  Some mice come with adapters with which the
    360   connector can be converted to another. If you are to use such an
    361   adapter, remember that the connector at the very end of the
    362   mouse/adapter pair is what matters.
    363 
    364   The next thing to decide is a device node to use for the given
    365   interface.  For the bus and PS/2 mice, there is little choice; your OS
    366   most possibly offers just one device node each for the bus mouse and
    367   PS/2 mouse.  There may be more than one serial port to which the
    368   serial mouse can be attached.
    369 
    370   The next step is to guess the appropriate protocol type for the mouse.
    371   The X server may be able to select a protocol type for the given mouse
    372   automatically in some cases.  Otherwise, the user has to choose one
    373   manually.  Follow the guidelines below.
    374 
    375 
    376      Bus mouse
    377         The bus and InPort mice always use "BusMouse" protocol
    378         regardless of the brand of the mouse.
    379 
    380         Some OSs may allow you to specify "Auto" as the protocol type
    381         for the bus mouse.
    382 
    383 
    384      PS/2 mouse
    385         The "PS/2" protocol should always be tried first for the PS/2
    386         mouse regardless of the brand of the mouse.  Any PS/2 mouse
    387         should work with this protocol type, although wheels and other
    388         additional features are unavailable in the X server.
    389 
    390         After verifying the mouse works with this protocol, you may
    391         choose to specify one of "xxxPS/2" protocols so that extra
    392         features are made available in the X server.  However, support
    393         for these PS/2 mice assumes certain behavior of the underlying
    394         OS and may not always work as expected.  Support for some PS/2
    395         mouse models may be disabled all together for some OS platforms
    396         for this reason.
    397 
    398         Some OSs may allow you to specify "Auto" as the protocol type
    399         for the PS/2 mouse and the X server will automatically adjust
    400         itself.
    401 
    402 
    403      Serial mouse
    404         The server supports a wide range of mice, both old and new.  If
    405         your mouse is of a relatively new model, it may conform to the
    406         PnP COM device specification and the X server may be able to
    407         detect an appropriate protocol type for the mouse automatically.
    408 
    409         Specify "Auto" as the protocol type and start the X server.  If
    410         the mouse is not a PnP mouse, or the X server cannot determine a
    411         suitable protocol type, the server will print the following
    412         error message and abort.
    413 
    414 
    415         <mousename>: cannot determine the mouse protocol
    416 
    417 
    418 
    419      If the X server generates the above error message, you need to
    420      manually specify a protocol type for your mouse.  Choose one from
    421      the following list:
    422 
    423 
    424         o  GlidePoint
    425 
    426         o  IntelliMouse
    427 
    428         o  Logitech
    429 
    430         o  Microsoft
    431 
    432         o  MMHittab
    433 
    434         o  MMSeries
    435 
    436         o  MouseMan
    437 
    438         o  MouseSystems
    439 
    440         o  ThinkingMouse
    441 
    442      When you choose, keep in mind the following rule of thumb:
    443 
    444 
    445         1. "Logitech" protocol is for old serial mouse models from
    446            Logitech.  Modern Logitech mice use either "MouseMan" or
    447            "Microsoft" protocol.
    448 
    449         2. Most 2-button serial mice support the "Microsoft" protocol.
    450 
    451         3. 3-button serial mice may work with the "Mousesystems"
    452            protocol. If it doesn't, it may work instead with the
    453            "Microsoft" protocol although the third (middle) button won't
    454            function.  3-button serial mice may also work with the
    455            "Mouseman" protocol under which the third button may function
    456            as expected.
    457 
    458         4. 3-button serial mice may have a small switch at the bottom of
    459            the mouse to choose between ``MS'' and ``PC'', or ``2'' and
    460            ``3''.  ``MS'' or ``2'' usually mean the "Microsoft"
    461            protocol.  ``PC'' or ``3'' will choose the "MouseSystems"
    462            protocol.
    463 
    464         5. If the serial mouse has a roller or a wheel, it may be
    465            compatible with the "IntelliMouse" protocol.
    466 
    467         6. If the serial mouse has a roller or a wheel and it doesn't
    468            work with the "IntelliMouse" protocol, you have to use it as
    469            a regular 2- or 3-button serial mouse.
    470 
    471      If the "Auto" protocol is specified and the mouse seems to be
    472      working, but you find that not all features of the mouse are
    473      available, that is because the X server does not have native
    474      support for that model of mouse and is using a ``compatible''
    475      protocol according to PnP information.
    476 
    477      If you suspect this is the case with your mouse, please enter a bug
    478      report at http://bugzilla.freedesktop.org, using the xorg product.
    479 
    480 
    481      USB mouse
    482         If your mouse is connected to the USB port, it can either be
    483         supported by the "Auto" protocol, or by an OS-specific protocol
    484         (see below), or as a generic Human Interface Device by the "usb"
    485         protocol.
    486 
    487 
    488      Standardized protocols
    489         Mouse device drivers in your OS may use the standardized
    490         protocol regardless of the model or the class of the mouse.  For
    491         example, SVR4 systems may support "Xqueue" protocol.  In FreeBSD
    492         the system mouse device /dev/sysmouse uses the "SysMouse"
    493         protocol.  Please refer to the OS support section of this file
    494         for more information.
    495 
    496 
    497 
    498   5.  xorg.conf Options
    499 
    500 
    501   The old Pointer section has been replaced by a more general
    502   InputDevice section. The following is a minimal example of an
    503   InputDevice section for a mouse:
    504 
    505 
    506   Section "InputDevice"
    507           Identifier      "Mouse 1"
    508           Driver          "mouse"
    509           Option          "Device"    "/dev/mouse"
    510           Option          "Protocol"  "Auto"
    511   EndSection
    512 
    513 
    514 
    515   The mouse driver supports the following config file options:
    516 
    517 
    518   5.1.  Buttons
    519 
    520   This option tells the X server the number of buttons on the mouse.
    521   Currently there is no reliable way to automatically detect the correct
    522   number.  This option is the only means for the X server to obtain it.
    523   The default value is three.
    524 
    525 
    526   Note that if you intend to assign Z axis movement to button events
    527   using the ZAxisMapping option below, you need to take account of those
    528   buttons into N too.
    529 
    530 
    531           Option  "Buttons"   "N"
    532 
    533 
    534 
    535   5.2.  ZAxisMapping
    536 
    537   This option maps the Z axis (wheel) motion to buttons or to another
    538   axis.
    539 
    540 
    541           Option  "ZAxisMapping"      "X"
    542           Option  "ZAxisMapping"      "Y"
    543           Option  "ZAxisMapping"      "N1 N2"
    544           Option  "ZAxisMapping"      "N1 N2 N3 N4"
    545 
    546 
    547 
    548   The first example will map the Z axis motion to the X axis motion.
    549   Whenever the user moves the wheel/roller, its movement is reported as
    550   the X axis motion. When the wheel/roller stays still, the real X axis
    551   motion is reported as is. The third example will map negative Z axis
    552   motion to the button N1 and positive Z axis motion to the button N2.
    553   If this option is used and the buttons N1 or N2 actually exists in the
    554   mouse, their actions won't be detected by the X server.
    555 
    556   The last example is useful for the mouse with two wheels of which the
    557   second wheel is used to generate horizontal scroll action, and the
    558   mouse which has a knob or a stick which can detect the horizontal
    559   force applied by the user.  The motion of the second wheel will be
    560   mapped to the buttons N3, for the negative direction, and N4, for the
    561   positive direction.  If the buttons N3 and N4 actually exist in this
    562   mouse, their actions won't be detected by the X server.
    563 
    564   NOTE #1: horizontal movement may not always be detected by the current
    565   version of the X11R7.5 X servers, because there appears to be no
    566   accepted standard as to how the horizontal direction is encoded in
    567   mouse data.
    568 
    569   NOTE #2: Some mice think left is the negative horizontal direction,
    570   others may think otherwise.  Moreover, there are some mice whose two
    571   wheels are both mounted vertically, and the direction of the second
    572   vertical wheel does not match the first one's.
    573 
    574   You need to edit the xorg.conf file by hand to change this option if
    575   the default value of "4 5 6 7" does not match the needs of your
    576   configuration.
    577 
    578 
    579   5.3.  Resolution
    580 
    581   The following option will set the mouse device resolution to N counts
    582   per inch, if possible:
    583 
    584 
    585           Option  "Resolution"        "N"
    586 
    587 
    588 
    589   Not all mice and OSs can support this option.
    590 
    591   5.4.  Drag Lock Buttons
    592 
    593   Some people find it difficult or inconvenient to hold a trackball
    594   button down, while at the same time moving the ball. Drag lock buttons
    595   simulate the holding down of another button. When a drag lock button
    596   is first pressed, its target buttons is "locked" down until the second
    597   time the lock button is released, or until the button itself is
    598   pressed and released. This allows the starting of a drag, the movement
    599   of the trackball, and the ending of the drag to be separate
    600   operations.
    601 
    602 
    603           Option  "DragLockButtons"   "W X Y Z"
    604 
    605 
    606 
    607   This option consists of pairs of buttons. Each lock button number is
    608   followed by the number of the button that it locks. In the above,
    609   button number "W" is a drag lock button for button "X" and button
    610   number "Y" is a drag lock button for button "Z".
    611 
    612   It may not be desirable to use multiple buttons as drag locks.
    613   Instead, a "master drag lock button" may be defined. A master drag
    614   lock button acts as a "META" key. After a master lock button is
    615   released, the next button pressed is "locked" and not released until
    616   the second time the real button is released.
    617 
    618 
    619           Option  "DragLockButtons"   "M"
    620 
    621 
    622 
    623   Since button "M" is unpaired it is a master drag lock button.
    624 
    625 
    626   6.  Mouse Gallery
    627 
    628 
    629   In all of the examples below, it is assumed that /dev/mouse is a link
    630   to the appropriate serial port or PS/2 mouse device.
    631 
    632 
    633   6.1.  MS IntelliMouse (serial, PS/2)
    634 
    635   This mouse has a wheel which also acts as the button 2 (middle
    636   button).  The wheel movement is recognized as the Z axis motion.  This
    637   behavior is not compatible with XFree86 versions prior to 3.3.2, but
    638   is more consistent with the support for other mice with wheels or
    639   rollers.  If you want to make the wheel behave like before, you can
    640   use the "ZAxisMapping" option as described above.
    641 
    642   IntelliMouse supports the PnP COM device specification.
    643 
    644   To use this mouse as a serial device:
    645 
    646           Option  "Protocol"  "Auto"
    647 
    648 
    649   or:
    650 
    651           Option  "Protocol"  "IntelliMouse"
    652 
    653 
    654 
    655   To use this mouse as the PS/2 device and the OS supports PS/2 mouse
    656   initialization:
    657           Option  "Protocol"  "IMPS/2"
    658 
    659 
    660 
    661   To use this mouse as the PS/2 device but the OS does not support PS/2
    662   mouse initialization (the wheel won't work in this case):
    663 
    664           Option  "Protocol"  "PS/2"
    665 
    666 
    667 
    668   To use this mouse as the PS/2 device and the OS supports automatic
    669   PS/2 mouse detection:
    670 
    671           Option  "Protocol"  "Auto"
    672 
    673 
    674 
    675   6.2.  MS IntelliMouse Explorer (PS/2, USB)
    676 
    677   This mouse has a wheel which also acts as the button 2 (middle
    678   button).  There are two side buttons; they are recognized as the
    679   buttons 4 and 5.  The wheel movement is recognized as the Z axis
    680   motion.
    681 
    682   To use this mouse as the PS/2 device and the OS supports PS/2 mouse
    683   initialization:
    684 
    685           Option  "Protocol"  "ExplorerPS/2"
    686 
    687 
    688 
    689   To use this mouse as the PS/2 device but the OS does not support PS/2
    690   mouse initialization (the wheel and the side buttons won't work in
    691   this case):
    692 
    693           Option  "Protocol"  "PS/2"
    694 
    695 
    696 
    697   To use this mouse as the PS/2 device and the OS supports automatic
    698   PS/2 mouse detection:
    699 
    700           Option  "Protocol"  "Auto"
    701 
    702 
    703 
    704   To use this mouse as the USB device and the OS supports the generic
    705   HID protocol:
    706 
    707           Option  "Protocol"  "usb"
    708 
    709 
    710 
    711   To use this mouse as the USB device and the OS supports automatic
    712   mouse detection:
    713 
    714           Option  "Protocol"  "Auto"
    715 
    716 
    717 
    718   6.3.  Kensington Thinking Mouse and Kensington Expert Mouse (serial,
    719   PS/2)
    720 
    721   These mice have four buttons.  The Kensington Expert Mouse is really a
    722   trackball.  Both Thinking mice support the PnP COM device
    723   specification.
    724 
    725   To use this mouse as a serial device:
    726 
    727           Option  "Protocol"  "Auto"
    728 
    729 
    730   or:
    731 
    732           Option  "Protocol"  "ThinkingMouse"
    733 
    734 
    735 
    736   To use this mouse as the PS/2 device and the OS supports PS/2 mouse
    737   initialization:
    738 
    739           Option  "Protocol"  "ThinkingMousePS/2"
    740 
    741 
    742 
    743   To use this mouse as the PS/2 device but the OS does not support PS/2
    744   mouse initialization (the third and the fourth buttons act as though
    745   they were the first and the second buttons):
    746 
    747           Option  "Protocol"  "PS/2"
    748 
    749 
    750 
    751   To use this mouse as the PS/2 device and the OS supports automatic
    752   PS/2 mouse detection:
    753 
    754           Option  "Protocol"  "Auto"
    755 
    756 
    757 
    758   6.4.  Genius NetScroll (PS/2)
    759 
    760   This mouse has four buttons and a roller. The roller movement is
    761   recognized as the Z axis motion.
    762 
    763   To use this mouse as the PS/2 device and the OS supports PS/2 mouse
    764   initialization:
    765 
    766           Option  "Protocol"  "NetScrollPS/2"
    767 
    768 
    769 
    770   To use this mouse as the PS/2 device but the OS does not support PS/2
    771   mouse initialization (the roller and the fourth button won't work):
    772 
    773           Option  "Protocol"  "PS/2"
    774 
    775 
    776 
    777   To use this mouse as the PS/2 device and the OS supports automatic
    778   PS/2 mouse detection:
    779 
    780           Option  "Protocol"  "Auto"
    781 
    782 
    783   6.5.  Genius NetMouse and NetMouse Pro (serial, PS/2)
    784 
    785   These mice have a "magic button" which is used like a wheel or a
    786   roller. The "magic button" action is recognized as the Z axis motion.
    787   NetMouse Pro is identical to NetMouse except that it has the third
    788   button on the left hand side.
    789 
    790   NetMouse and NetMouse Pro support the PnP COM device specification.
    791   When used as a serial mouse, they are compatible with MS IntelliMouse.
    792 
    793   To use these mice as a serial device:
    794 
    795           Option  "Protocol"  "Auto"
    796 
    797 
    798   or:
    799 
    800           Option  "Protocol"  "IntelliMouse"
    801 
    802 
    803 
    804   To use this mouse as the PS/2 device and the OS supports PS/2 mouse
    805   initialization:
    806 
    807           Option  "Protocol"  "NetMousePS/2"
    808 
    809 
    810 
    811   To use this mouse as the PS/2 device but the OS does not support PS/2
    812   mouse initialization (the "magic button" and the third button won't
    813   work):
    814 
    815           Option  "Protocol"  "PS/2"
    816 
    817 
    818 
    819   To use this mouse as the PS/2 device and the OS supports automatic
    820   PS/2 mouse detection:
    821 
    822           Option  "Protocol"  "Auto"
    823 
    824 
    825 
    826   6.6.  Genius NetScroll Optical (PS/2, USB)
    827 
    828   This mouse has a wheel which also acts as the button 2 (middle
    829   button), and two side buttons which are recognized as the buttons 4
    830   and 5.  It is compatible with NetMouse and NetMouse Pro.
    831 
    832   To use this mouse as the PS/2 device and the OS supports PS/2 mouse
    833   initialization:
    834 
    835           Option  "Protocol"  "NetMousePS/2"
    836 
    837 
    838 
    839   To use this mouse as the PS/2 device but the OS does not support PS/2
    840   mouse initialization (the wheel and the side buttons won't work):
    841 
    842           Option  "Protocol"  "PS/2"
    843 
    844 
    845 
    846   To use this mouse as the PS/2 device and the OS supports automatic
    847   PS/2 mouse detection:
    848           Option  "Protocol"  "Auto"
    849 
    850 
    851 
    852   To use this mouse as the USB device and the OS supports the generic
    853   HID protocol:
    854 
    855           Option  "Protocol"  "usb"
    856 
    857 
    858 
    859   To use this mouse as the USB device and the OS supports automatic
    860   mouse detection:
    861 
    862           Option  "Protocol"  "Auto"
    863 
    864 
    865 
    866   6.7.  ALPS GlidePoint (serial, PS/2)
    867 
    868   The serial version of this pad device has been supported since XFree86
    869   3.2. `Tapping' action is interpreted as the fourth button press.
    870   (IMHO, the fourth button of GlidePoint should always be mapped to the
    871   first button in order to make this pad behave like the other pad
    872   products.)
    873 
    874   To use this pad as a serial device:
    875 
    876           Option  "Protocol"  "GlidePoint"
    877 
    878 
    879 
    880   To use this mouse as the PS/2 device and the OS supports PS/2 mouse
    881   initialization:
    882 
    883           Option  "Protocol"  "GlidePointPS/2"
    884 
    885 
    886 
    887   To use this mouse as the PS/2 device but the OS does not support PS/2
    888   mouse initialization:
    889 
    890           Option  "Protocol"  "PS/2"
    891 
    892 
    893 
    894   To use this mouse as the PS/2 device and the OS supports automatic
    895   PS/2 mouse detection:
    896 
    897           Option  "Protocol"  "Auto"
    898 
    899 
    900 
    901   6.8.  ASCII MieMouse (serial, PS/2)
    902 
    903   This mouse appears to be OEM from Genius. Although its shape is quite
    904   different, it works like Genius NetMouse Pro. This mouse has a "knob"
    905   which is used like a wheel or a roller. The "knob" action is
    906   recognized as the Z axis motion.
    907 
    908   MieMouse supports the PnP COM device specification. When used as a
    909   serial mouse, it is compatible with MS IntelliMouse.
    910 
    911 
    912   To use this mouse as a serial device:
    913 
    914           Option  "Protocol"  "Auto"
    915 
    916 
    917   or:
    918 
    919           Option  "Protocol"  "IntelliMouse"
    920 
    921 
    922 
    923   To use this mouse as the PS/2 device and the OS supports PS/2 mouse
    924   initialization:
    925 
    926           Option  "Protocol"  "NetMousePS/2"
    927 
    928 
    929 
    930   To use this mouse as the PS/2 device but the OS does not support PS/2
    931   mouse initialization (the knob and the third button won't work):
    932 
    933           Option  "Protocol"  "PS/2"
    934 
    935 
    936 
    937   To use this mouse as the PS/2 device and the OS supports automatic
    938   PS/2 mouse detection:
    939 
    940           Option  "Protocol"  "Auto"
    941 
    942 
    943 
    944   6.9.  Logitech MouseMan+ and FirstMouse+ (serial, PS/2)
    945 
    946   MouseMan+ has two buttons on top, one side button and a roller.
    947   FirstMouse+ has two buttons and a roller. The roller movement is
    948   recognized as the Z axis motion. The roller also acts as the third
    949   button. The side button is recognized as the fourth button.
    950 
    951   MouseMan+ and FirstMouse+ support the PnP COM device specification.
    952   They have MS IntelliMouse compatible mode when used as a serial mouse.
    953 
    954   To use these mice as a serial device:
    955 
    956           Option  "Protocol"  "Auto"
    957 
    958 
    959   or:
    960 
    961           Option  "Protocol"  "IntelliMouse"
    962 
    963 
    964 
    965   To use this mouse as the PS/2 device and the OS supports PS/2 mouse
    966   initialization:
    967 
    968           Option  "Protocol"  "MouseManPlusPS/2"
    969 
    970 
    971 
    972   To use this mouse as the PS/2 device but the OS does not support PS/2
    973   mouse initialization (the wheel and the fourth button won't work):
    974 
    975           Option  "Protocol"  "PS/2"
    976 
    977   To use this mouse as the PS/2 device and the OS supports automatic
    978   PS/2 mouse detection:
    979 
    980           Option  "Protocol"  "Auto"
    981 
    982 
    983 
    984   6.10.  IBM ScrollPoint (PS/2)
    985 
    986   ScrollPoint has a "stick" in between the two buttons.  This "stick" is
    987   the same as the stick-shaped pointing device often found on notebook
    988   computers, on which you move the mouse cursor by pushing the stick.
    989   The stick movement is recognized as the Z axis motion.  You can push
    990   the stick to right and left, as well as forward and backward. Give
    991   four numbers to ZAxisMapping option to map movement along all these
    992   four directions to button actions.
    993 
    994   This mouse is compatible with Logitech MouseMan+.  To use this mouse
    995   as the PS/2 device and the OS supports PS/2 mouse initialization:
    996 
    997           Option  "Protocol"  "MouseManPlusPS/2"
    998 
    999 
   1000 
   1001   To use this mouse as the PS/2 device but the OS does not support PS/2
   1002   mouse initialization (the stick won't work):
   1003 
   1004           Option  "Protocol"  "PS/2"
   1005 
   1006 
   1007 
   1008   To use this mouse as the PS/2 device and the OS supports automatic
   1009   PS/2 mouse detection:
   1010 
   1011           Option  "Protocol"  "Auto"
   1012 
   1013 
   1014 
   1015   6.11.  8D ScrollMouse (serial, PS/2)
   1016 
   1017   ScrollMouse, also known as GyroMouse, has a "stick" similar to IBM
   1018   ScrollPoint.  The stick movement is recognized as the Z axis motion.
   1019   You can push the stick to right and left, as well as forward and
   1020   backward. Give four numbers to ZAxisMapping option to map movement
   1021   along all these four directions to button actions.
   1022 
   1023   ScrollMouse supports the PnP COM device specification. When used as a
   1024   serial mouse, it is compatible with MS IntelliMouse.
   1025 
   1026   To use this mouse as a serial device:
   1027 
   1028           Option  "Protocol"  "Auto"
   1029 
   1030 
   1031   or:
   1032 
   1033           Option  "Protocol"  "IntelliMouse"
   1034 
   1035 
   1036 
   1037   To use this mouse as the PS/2 device and the OS supports PS/2 mouse
   1038   initialization:
   1039 
   1040 
   1041           Option  "Protocol"  "IMPS/2"
   1042 
   1043 
   1044 
   1045   To use this mouse as the PS/2 device but the OS does not support PS/2
   1046   mouse initialization (the stick won't work):
   1047 
   1048           Option  "Protocol"  "PS/2"
   1049 
   1050 
   1051 
   1052   To use this mouse as the PS/2 device and the OS supports automatic
   1053   PS/2 mouse detection:
   1054 
   1055           Option  "Protocol"  "Auto"
   1056 
   1057 
   1058 
   1059   6.12.  A4 Tech 4D mice (serial, PS/2, USB)
   1060 
   1061   A4 Tech produces quit a number of mice with one or two wheels.  Their
   1062   mice may have 2, 3, or 4 buttons.  The wheels movement is recognized
   1063   as the Z axis motion.  Give four numbers to ZAxisMapping option to map
   1064   movement of both wheels to button actions.
   1065 
   1066   4D mice support the PnP COM device specification. When used as a
   1067   serial mouse, it is compatible with MS IntelliMouse.
   1068 
   1069   To use this mouse as a serial device:
   1070 
   1071           Option  "Protocol"  "Auto"
   1072 
   1073 
   1074   or:
   1075 
   1076           Option  "Protocol"  "IntelliMouse"
   1077 
   1078 
   1079 
   1080   To use this mouse as the PS/2 device and the OS supports PS/2 mouse
   1081   initialization:
   1082 
   1083           Option  "Protocol"  "IMPS/2"
   1084 
   1085 
   1086 
   1087   To use this mouse as the PS/2 device but the OS does not support PS/2
   1088   mouse initialization (the wheels won't work):
   1089 
   1090           Option  "Protocol"  "PS/2"
   1091 
   1092 
   1093 
   1094   To use this mouse as the PS/2 device and the OS supports automatic
   1095   PS/2 mouse detection:
   1096 
   1097           Option  "Protocol"  "Auto"
   1098 
   1099 
   1100 
   1101   To use this mouse as the USB device and the OS supports the generic
   1102   HID protocol:
   1103 
   1104           Option  "Protocol"  "usb"
   1105 
   1106   To use this mouse as the USB device and the OS supports automatic
   1107   mouse detection:
   1108 
   1109           Option  "Protocol"  "Auto"
   1110 
   1111 
   1112 
   1113   7.  Configuration Examples
   1114 
   1115 
   1116   This section shows some example InputDevice section for popular mice.
   1117   All the examples assume that the mouse is connected to the PS/2 mouse
   1118   port, and the OS supports the PS/2 mouse initialization.  It is also
   1119   assumed that /dev/mouse is a link to the PS/2 mouse port.
   1120 
   1121   Logitech MouseMan+ has 4 buttons and a wheel. The following example
   1122   makes the wheel movement available as the button 5 and 6.
   1123 
   1124 
   1125   Section "InputDevice"
   1126           Identifier      "MouseMan+"
   1127           Driver          "mouse"
   1128           Option          "Device"    "/dev/mouse"
   1129           Option          "Protocol"  "MouseManPlusPS/2"
   1130           Option          "Buttons"   "6"
   1131           Option          "ZAxisMapping"      "5 6"
   1132   EndSection
   1133 
   1134 
   1135 
   1136   You can change button number assignment using the xmodmap command
   1137   AFTER you start the X server with the above configuration.  You may
   1138   not like to use the wheel as the button 2 and rather want the side
   1139   button (button 4) act like the button 2. You may also want to map the
   1140   wheel movement to the button 4 and 5.  This can be done by the
   1141   following command:
   1142 
   1143 
   1144           xmodmap -e "pointer = 1 6 3 2 4 5"
   1145 
   1146 
   1147 
   1148   After this command is run, the correspondence between the buttons and
   1149   button numbers will be as shown in the following table.
   1150 
   1151 
   1152   Physical Buttons        Reported as:
   1153   ------------------------------------
   1154   1 Left Button             Button 1
   1155   2 Wheel Button            Button 6
   1156   3 Right Button            Button 3
   1157   4 Side Button             Button 2
   1158   5 Wheel Negative Move     Button 4
   1159   6 Wheel Positive Move     Button 5
   1160 
   1161 
   1162 
   1163   Starting in the Xorg 6.9 release, you can also achieve this in your
   1164   configuration file by adding this to the "InputDevice" section in
   1165   xorg.conf:
   1166 
   1167           Option "ButtonMapping" "1 6 3 2 4 5"
   1168 
   1169 
   1170 
   1171   For the MS IntelliMouse Explorer which as a wheel and 5 buttons, you
   1172   may have the following InputDevice section.
   1173 
   1174 
   1175   Section "InputDevice"
   1176           Identifier      "IntelliMouse Explorer"
   1177           Driver          "mouse"
   1178           Option          "Device"    "/dev/mouse"
   1179           Option          "Protocol"  "ExplorerPS/2"
   1180           Option          "Buttons"   "7"
   1181           Option          "ZAxisMapping"      "6 7"
   1182   EndSection
   1183 
   1184 
   1185 
   1186   The IntelliMouse Explorer has 5 buttons, thus, you should give "7" to
   1187   the Buttons option if you want to map the wheel movement to buttons (6
   1188   and 7).  With this configuration, the correspondence between the
   1189   buttons and button numbers will be as follows:
   1190 
   1191 
   1192   Physical Buttons        Reported as:
   1193   ------------------------------------
   1194   1 Left Button             Button 1
   1195   2 Wheel Button            Button 2
   1196   3 Right Button            Button 3
   1197   4 Side Button 1           Button 4
   1198   5 Side Button 2           Button 5
   1199   6 Wheel Negative Move     Button 6
   1200   7 Wheel Positive Move     Button 7
   1201 
   1202 
   1203 
   1204   You can change button number assignment using xmodmap AFTER you
   1205   started the X server with the above configuration.
   1206 
   1207 
   1208           xmodmap -e "pointer = 1 2 3 4 7 5 6"
   1209 
   1210 
   1211 
   1212   The above command will moves the side button 2 to the button 7 and
   1213   make the wheel movement reported as the button 5 and 6. See the table
   1214   below.
   1215 
   1216 
   1217   Physical Buttons        Reported as:
   1218   ------------------------------------
   1219   1 Left Button             Button 1
   1220   2 Wheel Button            Button 2
   1221   3 Right Button            Button 3
   1222   4 Side Button 1           Button 4
   1223   5 Side Button 2           Button 7
   1224   6 Wheel Negative Move     Button 5
   1225   7 Wheel Positive Move     Button 6
   1226 
   1227 
   1228 
   1229   For the A4 Tech WinEasy mouse which has two wheels and 3 buttons, you
   1230   may have the following InputDevice section.
   1231 
   1232 
   1233 
   1234   Section "InputDevice"
   1235           Identifier      "WinEasy"
   1236           Driver          "mouse"
   1237           Option          "Device"    "/dev/mouse"
   1238           Option          "Protocol"  "IMPS/2"
   1239           Option          "Buttons"   "7"
   1240           Option          "ZAxisMapping"      "4 5 6 7"
   1241   EndSection
   1242 
   1243 
   1244 
   1245   The movement of the first wheel is mapped to the button 4 and 5. The
   1246   second wheel's movement will be reported as the buttons 6 and 7.
   1247 
   1248   The Kensington Expert mouse is really a trackball. It has 4 buttons
   1249   arranged in a rectangle around the ball.
   1250 
   1251 
   1252   Section "InputDevice"
   1253           Identifier  "DLB"
   1254           Driver      "mouse"
   1255           Option      "Protocol" "ThinkingMousePS/2"
   1256           Option      "Buttons" "3"
   1257           Option      "Emulate3Buttons"
   1258           Option      "Device" "/dev/mouse"
   1259           Option      "DragLockButtons" "2 1 4 3"
   1260   EndSection
   1261 
   1262 
   1263   In this example, button 2 is a drag lock button for button number 1,
   1264   and button 4 is a drag lock button for button 3.  Since button 2 is
   1265   above button 1 and button 4 is above button 3 in the layout of this
   1266   trackball, this is reasonable.
   1267 
   1268   Because button 2 is being used as a drag lock, it can not be used as
   1269   an ordinary button. However, it can be activated by using the
   1270   "Emulate3Buttons" feature. However, some people my be unable to press
   1271   two buttons at the same time. They may prefer the following
   1272   InputDevice section which defines button 4 as a master drag lock
   1273   button, and leaves button 2 free for ordinary use.
   1274 
   1275   Section "InputDevice"
   1276           Identifier  "MasterDLB"
   1277           Driver      "mouse"
   1278           Option      "Protocol" "ThinkingMousePS/2"
   1279           Option      "Buttons" "3"
   1280           Option      "Device" "/dev/mouse"
   1281           Option      "DragLockButtons" "4"
   1282   EndSection
   1283 
   1284 
   1285 
   1286