home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 8 / CDACTUAL8.iso / docs / mini / 3-button < prev    next >
Encoding:
Text File  |  1996-07-11  |  11.3 KB  |  279 lines

  1.  
  2.                      THE 3 BUTTON SERIAL MOUSE MINI-HOWTO
  3.                                        
  4.   Geoff Short grs100@york.ac.uk
  5.   
  6.    v1.02 9th May 1996
  7.      _________________________________________________________________
  8.    
  9.   0. Disclaimer 
  10.   1. Introduction 
  11.   2. Serial ports 
  12.   3. Switched Mice 
  13.   4. Normal Mice 
  14.   5. Switching a Mouse to 3-Button Mode 
  15.   6. XF86Config and Xconfig file examples 
  16.   7. Miscellaneous Problems and Setup 
  17.   8. Models tested 
  18.   9. Mouse Tail 
  19.   
  20.    
  21.      _________________________________________________________________
  22.    
  23.   0. Disclaimer 
  24.   
  25.    The following document is offered in good faith as comprising only
  26.    safe programming and procedures. No responsibility is accepted by the
  27.    author for any loss or damage caused in any way to any person or
  28.    equipment, as a direct or indirect consequence of following these
  29.    instructions.
  30.    
  31.   1. Introduction 
  32.   
  33.    Most X applications are written with the assumption that the user will
  34.    be working with a 3 button mouse. Serial mice are commonly used on
  35.    computers and are cheap to buy. Many of these mice have 3 buttons and
  36.    claim to use the Microsoft protocol, which in theory means they are
  37.    ideal for the X windows setup.
  38.    
  39.    Most dual-protocol mice will work in two modes:
  40.      * 2-button Microsoft mode.
  41.      * 3-button MouseSystems mode.
  42.        
  43.    This document leads you through the different steps needed to
  44.    configure your mouse in these two different modes, especially the
  45.    steps needed to use the more useful 3-button mode.
  46.    
  47.   2. Serial ports 
  48.   
  49.    The first thing to do is to make sure the software can find the mouse.
  50.    Work out which serial port your mouse is connected to - usually this
  51.    will be /dev/ttyS0 (COM1) or /dev/ttyS1 (COM2). (ttyS0 is usually the
  52.    9 pin socket, ttyS1 the 25 pin socket, but of course there is no hard
  53.    and fast rule about these things.) For convience make a new link
  54.    /dev/mouse pointing at this port. For instance, for COM1:
  55.      * ln -s /dev/ttyS0 /dev/mouse
  56.        
  57.   3. Switched Mice 
  58.   
  59.    Some mice, not usually the cheapest ones, have a switch on the bottom
  60.    marked `2/3'. Sometimes this may be `PC/MS'. In this case the `2' or
  61.    `PC' setting is usually for 2 button Microsoft mode, and the `3' or
  62.    `MS' for 3 button MouseSystems mode. If you have such a mouse, you can
  63.    switch the switch to `3' or `MS', put the MouseSystems settings in
  64.    your XConfigs (see below) and the mouse should work perfectly in
  65.    3-button mode.
  66.    
  67.   4. Normal Mice 
  68.   
  69.    If you don't have any switches, and no instructions, then a little bit
  70.    of experimentation is needed. The first thing to try is to assume the
  71.    mouse maker is telling the truth, and the mouse is full Microsoft. Set
  72.    up your Xconfigs to expect a microsoft mouse (see below) and give it
  73.    try.
  74.    
  75.    If the mouse didn't work at all, then you don't have a Microsoft
  76.    mouse, or there is some other problem. Try the other protocols in the
  77.    configs, the man page for the config file is the best place to start
  78.    looking. Also look in the Miscellaneous Problems section below.
  79.    
  80.    What you will probably find is that when you run X, the mouse works
  81.    fine but only the outer two buttons do anything. You can of course
  82.    accept this, and emulate the third button (press both buttons at once
  83.    to click the middle one) like you do with a two button mouse. To do
  84.    this, change your Xconfig file as shown in the relevent section below.
  85.    This may mean you have bought a 3 button mouse for no good reason, and
  86.    you are certainly no further forward. So, now you need to look at your
  87.    hardware.
  88.    
  89.   5. Switching a Mouse to 3-Button Mode 
  90.   
  91.    Even cheap mice can also work under the Mouse Systems protocol, with
  92.    all three buttons working. The trick is to get the mouse to think it's
  93.    a Mouse Systems one, something you rarely see in your instructions.
  94.      * Before you power up your computer, hold down the left mouse button
  95.        (and keep it held down until it has booted to be on the safe
  96.        side.)
  97.        
  98.    When the mouse first gets power, if the left button is held down it
  99.    switches into Mouse Systems mode. A simple fact, but not always
  100.    publicised. Note that a soft reboot of your computer may not cut the
  101.    mouse power and therefore may not work. There are a number of other
  102.    ways of switching the mode, which may or may not work with your
  103.    particular mouse. Some of these are less drastic than rebooting your
  104.    computer, one is more so!
  105.      * If your computer is get-at-able you can unplug the mouse and plug
  106.        it back in with the button held down, although I of course cannot
  107.        recommend this as you are not supposed to plug things in when the
  108.        power is on.
  109.      * You may be able to reset the mouse by typing echo "*n" >
  110.        /dev/mouse, which should have the same effect as unplugging it.
  111.        Hold the left button down for Mouse Systems mode, not for
  112.        Microsoft. You could put this in whatever script you use to start
  113.        X up.
  114.      * Someone has reported that the 'ClearDTR' line in the Xconfig is
  115.        enough to switch their mouse into Mouse Systems mode.
  116.      * If you know your way around a soldering iron, you might want to
  117.        look at the circuit board inside the mouse. You may find that the
  118.        board is designed for a switch between 2 &3 buttons, but it hasn't
  119.        been fitted. It will look something like:
  120.        
  121.  
  122.          -----------
  123.         | o | o | o |  SW1
  124.          -----------
  125.           1   2   3
  126.    Try linking pins 1-2 or 2-3, and see if it changes the behaviour of
  127.        the mouse. If it does, you can either fit a small switch, or
  128.        solder across the contacts for a quick &permenant solution. It has
  129.        been reported that some mice have a switch inside already, for
  130.        some strange reason known only to the manufacturer.
  131.        
  132.    It is also possible that you need to hold down the left button when
  133.    booting X windows. Some systems may send some sort of signal or spike
  134.    to the mouse when X starts, so bear this in mind as well.
  135.    
  136.    So now it's decision time - if you don't want the hassle of switching
  137.    your mouse's mode, you are stuck with two buttons. More likely, you'll
  138.    want to change your X configs to use the three button mode, which are
  139.    described in the section below.
  140.    
  141.   6. XF86Config and Xconfig file examples 
  142.   
  143.    The location of your configuration file for X depends on the
  144.    particular release and distribution you have. It will probably be
  145.    either /etc/Xconfig /etc/XF86Config or /usr/X11/lib/X11/XF86Config.
  146.    You should see which one it is when you start X - it should be echoed
  147.    to the screen before all the options are displayed.
  148.    
  149.     Microsoft Serial Mouse
  150.      * XF86config:
  151.  
  152. Section "Pointer"
  153.     Protocol "microsoft"
  154.     Device "/dev/mouse"
  155. EndSection
  156.      * Xconfig:
  157.  
  158. #
  159. # Mouse definition and related parameters
  160. #
  161. Microsoft      "/dev/mouse"
  162.  
  163.     Microsoft Serial Mouse with Three Button Emulation
  164.      * XF86config:
  165.  
  166. Section "Pointer"
  167.     Protocol "microsoft"
  168.     Device "/dev/mouse"
  169.     Emulate3Buttons
  170. EndSection
  171.      * Xconfig:
  172.  
  173. #
  174. # Mouse definition and related parameters
  175. #
  176. Microsoft      "/dev/mouse"
  177. Emulate3Buttons
  178.  
  179.     MouseSystems Three Button Serial Mouse
  180.      * XF86config:
  181.  
  182. Section "Pointer"
  183.  
  184.     Protocol "mousesystems"
  185.     Device "/dev/mouse"
  186.  
  187. #    ClearDTR           #  These two lines probably won't be needed,
  188. #    ClearRTS           #  try without first and then just the DTR
  189.  
  190. EndSection
  191.      * Xconfig:
  192.  
  193. #
  194. # Mouse definition and related parameters
  195. #
  196.  
  197. MouseSystems    "/dev/mouse"
  198.  
  199. #ClearDTR               #  These two lines probably won't be needed,
  200. #ClearRTS               #  try without first and then just the DTR
  201.  
  202.   7. Miscellaneous Problems and Setups 
  203.      * If you have trouble with your mouse in X or console mode, check
  204.        you are not running a getty on the serial line, or anything else
  205.        such as a modem for that matter.
  206.      * If you have trouble with your mouse in X, don't run the
  207.        text-screen mouse driver (gpm) at the same time as X - the two
  208.        often do not work together.
  209.      * If you do want to run gpm in MouseSystems mode, the command is gpm
  210.        -t msc &/tt>. gpm is also handy for probing your mouse settings -
  211.        type gpm -t help to print out your mouse type.
  212.    To try to get gpm and X to coexist, try running gpm with the -R option
  213.        so that it pipes the mouse data to /dev/gpmdata in MouseSystem
  214.        format. Then all you have to do is configure X to use /dev/gpmdata
  215.        as the device. (Thanks to mikedlt@u.washington.edu for this one.)
  216.    Logitech mice may require the line ChordMiddle to enable the middle of
  217.        the three buttons to work. This line replaces Emulate3Buttons or
  218.        goes after the /dev/mouse line in the config file.
  219.    Swapping buttons: use the xmodmap command to change which physical
  220.        button registers as each mouse click. eg:
  221.  xmodmap -e "pointer = 3 2 1"
  222.    will turn round the buttons for use in the left hand. If you only have
  223.        a two-button mouse then it's just numbers 1 &2.
  224.    Acceleration: use the xset m command to change the mouse settings. eg
  225.        xset m 2 will set the acceleration to 2. Look at the manpage for
  226.        full details.
  227.        
  228.   8. Models tested 
  229.   
  230.    There are a lot of different mice out there, and I cannot honestly say
  231.    that you should go out and buy one rather than the other. What I can
  232.    do is give a list of what I think these mice do, based on experience
  233.    and heresay. Even with this information you should be a little
  234.    cautious - we have two identical mice in our office on two computers,
  235.    some things work on one and not t'other! Any additions to this list
  236.    would be welcome.
  237.    
  238.         WiN mouse, as sold by Office World for eight quid.
  239.                Standard dual-mode Microsoft/MouseSystems.
  240.         Agiler,
  241.                Standard dual-mode Microsoft/MouseSystems. Not solderable.
  242.         Sicos,
  243.                Works ok, needs ClearDTR &Clear RTS in config.
  244.         Index sell a mouse for 10 quid,
  245.                Doesn't work in 3 button mode, but does have nice
  246.                instructions :-)
  247.         Artec,
  248.                Usual dual-protocol mouse, needs 'ClearDTR' set in config,
  249.                NOT 'ClearRTS'
  250.         DynaPoint 3 button serial mouse.
  251.                Usual dual-protocol mouse, needs 'ClearDTR' AND 'ClearRTS'
  252.                in Xconfig.
  253.         Genius 3 button mouse
  254.                Steven Aizic is working on this one for me.
  255.                
  256.   9. Mouse Tail 
  257.   
  258.    Fuller details of the Xconfig &XF86Config files are found on the
  259.    relevant man pages, and in the documentation about installing X
  260.    windows such as the Xfree86 HOWTO. Much of the information for this
  261.    document has been trawled from the various linux newsgroups. I am
  262.    sorry I did not keep a record of everyone who has indirectly
  263.    contributed by this route, thank you all very much.
  264.    
  265.    So, to sum up:
  266.      * Even cheap 3 button Microsoft mice can be made to work.
  267.      * Configure your copy of X to expect a Mouse Systems mouse.
  268.      * Hold down the left button at power-on to switch the mouse to
  269.        MouseSystems mode.
  270.      * You might need to hold the left button down when starting X.
  271.      * Mice are more intelligent than you think.
  272.        
  273.    
  274.      _________________________________________________________________
  275.    
  276.    Page written by Geoff Short, started March 1996
  277.    
  278.    Go to homepage, send us mail or leave a comment
  279.