The 3 Button Serial Mouse mini-HOWTO by Geoff Short (best novels for students .TXT) π
∑ The ClearDTR flag may not work properly on some systems, unless you disable the RTS/CTS handshaking with the command:
stty -crtscts < /dev/mouse
(Tested on UART 16450/Pentium by Vladimir Geogjaev geog≠ [emailΒ protected])
∑ Logitech mice may require the line ChordMiddle to enable the middle of the three buttons to work. This line replaces Emulate3Buttons or goes after the /dev/mouse line in the config file. You may well need the ClearDTR and ClearRTS lines in your Xconfig. Some Logitech mice positively do not need the ChordMiddle line - one symptom of this problem is that menus seem to mov
Read free book Β«The 3 Button Serial Mouse mini-HOWTO by Geoff Short (best novels for students .TXT) πΒ» - read online or download for free at americanlibrarybooks.com
- Author: Geoff Short
- Performer: -
Read book online Β«The 3 Button Serial Mouse mini-HOWTO by Geoff Short (best novels for students .TXT) πΒ». Author - Geoff Short
The 3 Button Serial Mouse mini-HOWTO
Geoff Short, [email protected]
v1.33, 31 May 1998How to get a 3 button serial mouse working properly under Linux.
βββββββββββββββββββββββ-
Table of Contents
1. Disclaimer 2. Introduction 3. Serial Ports 4. Switched Mice 5. Normal Mice 6. Switching a Mouse to 3Button Mode 7. Wheeled mice 8. Using gpm to Switch Mouse Modes 9. Using two mice 10. XF86Config and Xconfig file examples 11. Cables, extensions and adaptors 12. Miscellaneous Problems and Setups 13. Models Tested 14. Further Information 15. Mouse Tailβββββββββββββββββββββββ-
1. DisclaimerThe following document is offered in good faith as comprising only
safe programming and procedures. No responsibility is accepted by the
author for any loss or damage caused in any way to any person or
equipment, as a direct or indirect consequence of following these
instructions.
2. IntroductionThe most recent version of this document can always be found at
http://kipper.york.ac.uk/mouse.html
There is a Japanese translation at http://jf.gee.kyoto-u.ac.jp/JF/JF-ftp/euc/3Button-Mouse.euc; and a French one at
http://www.freenix.fr/linux/HOWTO/mini/3Button-Mouse.html. Other
translations may be available - check your local LDP mirrors.
Most X applications are written with the assumption that the user will
be working with a 3 button mouse. Serial mice are commonly used on
computers and are cheap to buy. Many of these mice have 3 buttons and
claim to use the Microsoft protocol, which in theory means they are
ideal for the X windows setup. (The record for the cheapest working 3
button mouse currently stands at $1.14!)
Most dual-protocol mice will work in two modes:
β 2-button Microsoft mode.
β 3-button MouseSystems mode.
This document leads you through the different steps needed to
configure your mouse in these two different modes, especially the
steps needed to use the more useful 3-button mode.
As distributions become easier to set up, some of the problems ought
to go away. For instance, RedHat have a mouseconfig program to set
things up for you. However, some versions of RH5.0 had a bug in
mouseconfig, so make sure you check for patches.
3. Serial PortsThe first thing to do is to make sure the software can find the mouse.
Work out which serial port your mouse is connected to - usually this
will be devttyS0 (COM1 under DOS) or devttyS1 (COM2). (ttyS0 is
usually the 9 pin socket, ttyS1 the 25 pin socket, but of course there
is no hard and fast rule about these things.) There are also an
equivalent number of devcua devices, which are almost the same as
the ttyS ones, but their use is now discouraged. For convenience make
a new link devmouse pointing at this port. For instance, for ttyS0:
ln -s devttyS0 devmouse
4. Switched MiceSome mice, not usually the cheapest ones, have a switch on the bottom
marked `2/3β. Sometimes this may be `PC/MSβ. In this case the `2β
setting is for 2 button Microsoft mode, and the `3β for 3 button
MouseSystems mode. The `PC/MSβ switch is a bit more complicated. You
will probably find the `MSβ setting is for Microsoft, and the `PCβ is
for MouseSystems. You may find the `PCβ setting described as ps/2
mode, but it should do MouseSystems as well. If you have such a
mouse, you can switch the switch to `3β or `PCβ, put the MouseSystems
settings in your XConfigs (see below) and the mouse should work
perfectly in 3-button mode.
5. Normal MiceIf you donβt have any switches, and no instructions, then a little bit
of experimentation is needed. The first thing to try is to assume the
mouse maker is telling the truth, and the mouse is full Microsoft. Set
up your Xconfigs to expect a Microsoft mouse (see the Xconfig section)
and give it a try.
If the mouse didnβt work at all, then you donβt have a Microsoft
mouse, or there is some other problem. Try the other protocols in the
configs, the man page for the config file is the best place to start
looking. Also look in the Miscellaneous Problems section below.
What you will probably find is that when you run X, the mouse works
fine but only the outer two buttons do anything. You can of course
accept this, and emulate the third button (press both buttons at once
to click the middle one) like you do with a two button mouse. To do
this, change your Xconfig file as shown in the Xconfig example section
below. This may mean you have bought a 3 button mouse for no good
reason, and you are certainly no further forward. So, now you need to
look at your hardware.
6. Switching a Mouse to 3Button ModeEven cheap mice can also work under the Mouse Systems protocol, with
all three buttons working. The trick is to get the mouse to think
itβs a Mouse Systems one, something you rarely see in your
instructions.
β Before you power up your computer, hold down the left mouse button
(and keep it held down until it has booted to be on the safe side).
When the mouse first gets power, if the left button is held down it
switches into Mouse Systems mode. A simple fact, but not always
publicised. Note that a soft reboot of your computer may not cut the
mouse power and therefore may not work. There are a number of other
ways of switching the mode, which may or may not work with your
particular mouse. Some of these are less drastic than rebooting your
computer, two are more so!
β If your computer is get-at-able you can unplug the mouse and plug
it back in with the button held down (although you shouldnβt
normally plug things in to a live computer, the RS232 spec says it
is OK).
β You may be able to reset the mouse by typing echo β*nβ >
devmouse, which should have the same effect as unplugging it.
Hold the left button down for Mouse Systems mode, not for
Microsoft. You could put this in whatever script you use to start X
up.
β Bob Nichols ([email protected]) has written a small c
program to do the same thing, which may work if echo β*nβ does not
(and vice versa). You can find a copy of his source code at
http://kipper.york.ac.uk/src/fix-mouse.c
β Someone has reported that the `ClearDTRβ line in the Xconfig is
enough to switch their mouse into Mouse Systems mode.
β If you are brave enough, open the mouse up (remember that this will
invalidate your warranty) and have a look inside. In some cases,
the mouse may have a switch inside, for some strange reason known
only to the manufacturer. More likely on the cheap mice is a jumper
which you can move. The switch or jumper may have the same effect
as a `MS/PCβ switch described in the βSwitched Mice sectionβ
above. You may find that the circuit board is designed for a
switch between 2 & 3 buttons, but it hasnβt been fitted. It will
look something like:
ββββ
| o | o | o | SW1
ββββ
1 2 3
Try linking pins 1-2 or 2-3, and see if it changes the behaviour of
the mouse. If it does, you can either fit a small switch, or solder
across the contacts for a quick and permanent solution.
β Another soldering solution which might be a last-resort for mice
which donβt understand MouseSystems at all, from Peter Benie
([email protected]). If the middle buttonβs switch is
double-pole, connect one side of the switch to the left buttonβs
switch, and the other side to right buttonβs switch. If itβs not a
double pole switch then use diodes rather than wire. Now, the
middle button pushes the left and right buttons down together.
Select ChordMiddle in the XF86Config and you have a working middle
button.
β The ultimate recourse with the soldering iron was first described
to me by Brian Craft ([email protected]). Two common
generic mouse chips are the 16 pin Z8350, and the 18 pin HM8350A.
On each of these chips, one pin controls the mode of the chip, as
follows.
Pin 3 Mode
ββ β-
Open Default Microsoft. Mouse Systems if a button is held on power-up.
GND Always Mouse Systems.
Vdd Always Microsoft.
(Pins are numbered as follows:)
β-
pin1 -| / |-
pin2 -| |-
pin3 -| |-
-| |-
-| |-
-| |-
-| |-
pin8 -|β-|-
(This info comes courtesy of Hans-Christoph Wirth, and Juergen Exner,
who posted it to de.comp.os.linux.hardware) You can solder a link
between pin 3 and gnd, which will fix the mouse into MouseSystems
mode.
β Peter Fredriksson ([email protected]) has tried the SYSGRATION
SYS2005 chip, and found that linking Pin 3 to Gnd forced Mouse
System mode.
β Uli Drescher ([email protected]) confirms it works on an HN8348A
chip; Ben Ketcham ([email protected]) confirms the
HM8348A (Pin 9 is Gnd).
β Urban Widmark ([email protected]) says the same applies to the
EC3567A1 chip, where Pin 8 is ground. Iβve tried it as well and it
works fine.
β Timo T Metsala ([email protected]) has found that on the
HT6510A chip pin 3 is mode select, pin 9 is Gnd. The same works
for the HT6513A chip. Holtek also make HT6513B and HT6513F chips -
on these, pin 8 is Gnd.
β Robert Romanowski ([email protected]) says pin 3 - pin 8 (Gnd)
works on an EM83701BP chip too.
β Robert Kaiser ([email protected]) confirms that pin 3 - Gnd works on
a EC3576A1 chip too.
β Sean Cross ([email protected]) found it was pin 2 - pin 7 (Gnd)
on a HM8370GP chip.
β Peter Fox ([email protected]) used pin 3 - pin 8 on a
HM8348A chip.
β Jon Klein ([email protected]) found pin 3 - pin 9 did the
trick for a UA5212S chip.
β As an alternative to the above soldering methods, you can get the
mouse to hold itβs own button down when booting: this circuit from
Mathias Katzer.
ββ
β R βββOββ + Supply
| ββ | | C = 100nF capacitor
| | E | R = 100kOhm
| β / | T = BC557 transistor
| / O
| B | #V | T /
|ββ|-# | / Left button switch of the mouse
| | # | O
| --/ |
β C |
β C ββOβββ-> (to somewhere deep inside the mouse)
|
### Ground
The test mouse was a no-name model MUS2S - whether this works in other
mice depends on the circuit of the mouse; if the switch is connected
to ground and not to +Supply, an npn-transistor like the BC547 should
work; R and C have to be swapped then, too.
So there you have it, the choice is yours. Stick with the default
Microsoft two buttons, or work out how to switch the mode and set X up
to take advantage of this.
7. Wheeled miceMice with wheels have emerged in the last few years, starting with the
Microsoft Intellimouse and spreading to other manufacturers. The
wheel can be clicked like a button, or rolled up and down. Far and
away the best reference for information is
http://www.inria.fr/koala/colas/mouse-wheel-scroll/ which describes
how to get lots of X applications to recognise the scrolling action.
In general, youβll need
Comments (0)