mouse(4)


NAME

   mouse - serial mouse interface

CONFIGURATION

   Serial  mice  are  connected  to  a  serial RS232/V24 dialout line, see
   ttyS(4) for a description.

DESCRIPTION

   Introduction
   The pinout of the usual 9 pin plug as used for serial mice is:

                      pin   name   used for
                        2    RX    Data
                        3    TX    -12 V, Imax = 10 mA
                        4   DTR    +12 V, Imax = 10 mA
                        7   RTS    +12 V, Imax = 10 mA
                        5   GND    Ground

   This is the specification, in fact 9 V suffices with most mice.

   The mouse driver can recognize a mouse  by  dropping  RTS  to  low  and
   raising  it again.  About 14 ms later the mouse will send 0x4D ('M') on
   the data line.  After a further 63 ms, a Microsoft-compatible  3-button
   mouse will send 0x33 ('3').

   The relative mouse movement is sent as dx (positive means right) and dy
   (positive means down).  Various mice can operate at  different  speeds.
   To  select  speeds, cycle through the speeds 9600, 4800, 2400, and 1200
   bit/s, each time writing the two characters from the  table  below  and
   waiting  0.1  seconds.   The following table shows available speeds and
   the strings that select them:

                               bit/s   string
                               9600    *q
                               4800    *p
                               2400    *o
                               1200    *n

   The first byte of  a  data  packet  can  be  used  for  synchronization
   purposes.

   Microsoft protocol
   The Microsoft protocol uses 1 start bit, 7 data bits, no parity and one
   stop bit at the speed of 1200 bits/sec.  Data is sent to RxD in  3-byte
   packets.  The dx and dy movements are sent as two's-complement, lb (rb)
   are set when the left (right) button is pressed:

                byte   d6   d5    d4    d3    d2    d1    d0
                   1   1    lb    rb    dy7   dy6   dx7   dx6
                   2   0    dx5   dx4   dx3   dx2   dx1   dx0
                   3   0    dy5   dy4   dy3   dy2   dy1   dy0

   3-button Microsoft protocol
   Original Microsoft mice only have two buttons.  However, there are some
   three  button  mice which also use the Microsoft protocol.  Pressing or
   releasing the middle button is reported by sending a packet  with  zero
   movement  and  no  buttons  pressed.   (Thus,  unlike for the other two
   buttons, the status of the  middle  button  is  not  reported  in  each
   packet.)

   Logitech protocol
   Logitech  serial  3-button  mice  use  a  different  extension  of  the
   Microsoft protocol: when the middle button  is  up,  the  above  3-byte
   packet  is  sent.   When  the  middle button is down a 4-byte packet is
   sent, where the 4th byte has value 0x20 (or at least has the  0x20  bit
   set).   In  particular,  a  press  of  the middle button is reported as
   0,0,0,0x20 when no other buttons are down.

   Mousesystems protocol
   The Mousesystems protocol uses 1 start bit, 8 data bits, no parity  and
   two  stop  bits  at the speed of 1200 bits/sec.  Data is sent to RxD in
   5-byte packets.  dx is sent as the  sum  of  the  two  two's-complement
   values,  dy  is send as negated sum of the two two's-complement values.
   lb (mb, rb) are  cleared  when  the  left  (middle,  right)  button  is
   pressed:

         byte   d7    d6     d5     d4     d3     d2     d1     d0
            1   1     0      0      0      0      lb     mb     rb
            2   0    dxa6   dxa5   dxa4   dxa3   dxa2   dxa1   dxa0
            3   0    dya6   dya5   dya4   dya3   dya2   dya1   dya0
            4   0    dxb6   dxb5   dxb4   dxb3   dxb2   dxb1   dxb0
            5   0    dyb6   dyb5   dyb4   dyb3   dyb2   dyb1   dyb0

   Bytes  4  and  5  describe the change that occurred since bytes 2 and 3
   were transmitted.

   Sun protocol
   The Sun protocol is the 3-byte version of the above 5-byte Mousesystems
   protocol: the last two bytes are not sent.

   MM protocol
   The  MM protocol uses 1 start bit, 8 data bits, odd parity and one stop
   bit at the speed of 1200 bits/sec.  Data  is  sent  to  RxD  in  3-byte
   packets.   dx  and  dy  are  sent as single signed values, the sign bit
   indicating a negative value.   lb  (mb,  rb)  are  set  when  the  left
   (middle, right) button is pressed:

             byte   d7   d6    d5    d4    d3    d2    d1    d0
                1   1     0     0    dxs   dys   lb    mb    rb
                2   0    dx6   dx5   dx4   dx3   dx2   dx1   dx0
                3   0    dy6   dy5   dy4   dy3   dy2   dy1   dy0

FILES

   /dev/mouse
          A commonly used symbolic link pointing to a mouse device.

SEE ALSO

   ttyS(4), gpm(8)

COLOPHON

   This  page  is  part of release 4.09 of the Linux man-pages project.  A
   description of the project, information about reporting bugs,  and  the
   latest     version     of     this    page,    can    be    found    at
   https://www.kernel.org/doc/man-pages/.


More Linux Commands

manpages/glutTabletButtonFunc.3.html
glutTabletButtonFunc(3) - sets the special keyboard callback
glutTabletButtonFunc sets the tablet button callback for the current window. The tablet button callback for a window is called when the window has tablet input

manpages/screendump.1.html
screendump(1) - dump the contents of a virtual console to st
The screendump command dumps the contents of virtual console N , (or the current console if N is omitted) to standard out. Just saying cat /dev/vcsN has a simil

manpages/XOffsetRegion.3.html
XOffsetRegion(3) - region arithmetic - Linux manual page....
The XIntersectRegion function computes the intersection of two regions. The XUnionRegion function computes the union of two regions. The XUnionRectWithRegion fu

manpages/strtok_r.3.html
strtok_r(3) - extract tokens from strings - Linux man page
The strtok() function breaks a string into a sequence of zero or more nonempty tokens. On the first call to strtok() the string to be parsed should be specified

manpages/git-revert.1.html
git-revert(1) - Revert some existing commits (Man Page).....
Given one or more existing commits, revert the changes that the related patches introduce, and record some new commits that record them. This requires your work

manpages/glutSpecialFunc.3.html
glutSpecialFunc(3) - sets the special keyboard callback for
glutSpecialFunc sets the special keyboard callback for the current window. The special keyboard callback is triggered when keyboard function or directional keys

manpages/podofotxtextract.1.html
podofotxtextract(1) Extract all text from a PDF file........
podofotxtextract is one of the command line tools from the PoDoFo library that provide several useful operations to work with PDF files. It can extract text fro

manpages/XkbSetPtrActionY.3.html
XkbSetPtrActionY(3) - Sets the high_YYY and low_YYY fields o
XkbSetPtrActionY.3 - Actions associated with the XkbPtrAction structure move the pointer when keys are pressed and released. If the MouseKeys control is not ena

manpages/perl5125delta.1.html
perl5125delta(1) what is new for perl v5.12.5 (Man Page)....
This document describes differences between the 5.12.4 release and the 5.12.5 release. If you are upgrading from an earlier release such as 5.12.3, first read p

manpages/iswupper.3.html
iswupper(3) - test for uppercase wide character (Man Page)
The iswupper() function is the wide-character equivalent of the isupper(3) function. It tests whether wc is a wide character belonging to the wide-character cla

manpages/erfl.3.html
erfl(3) - error function (Library - Linux man page).........
The erf() function returns the error function of x, defined as erf(x) = 2/sqrt(pi)* integral from 0 to x of exp(-t*t) dt RETURN VALUE On success, these function

manpages/iruserok_af.3.html
iruserok_af(3) routines for returning a stream to a remote c
The rcmd() function is used by the superuser to execute a command on a remote machine using an authentication scheme based on privileged port numbers. The rresv





We can't live, work or learn in freedom unless the software we use is free.