Computers
Read books online » Computers » The 3 Button Serial Mouse mini-HOWTO by Geoff Short (motivational books for women .txt) 📖

Book online «The 3 Button Serial Mouse mini-HOWTO by Geoff Short (motivational books for women .txt) 📖». Author Geoff Short



1 2 3
Go to page:
a fairly new Xserver to use the scrolling

action, but some older servers will recognise the clicking actions.

For instance, the Intellimouse is supported by XFree 3.3.1 and later.

8. Using gpm to Switch Mouse Modes

gpm is the program that lets you use the mouse in console mode. It is

usually included in linux distributions, and can be started from the

command line or in the startup script etcrc.d/rc.local. Note that

distributions don’t always have the most recent version (1.13 at time

of writing) which can be found on mirrors of sunsite.unc.edu.

 

The main modes for serial mice under gpm are:

 

gpm -t ms

gpm -t msc

gpm -t help

 

for Microsoft or MouseSystems modes, or to probe the mouse for you and

tell you what it found. To run gpm in MouseSystems mode, you may need

a -3 flag, and possibly a DTR option, using the -o dtr flag:

 

gpm -3 -o dtr -t msc

 

gpm is often able to recognise all three buttons of the mouse even in

Microsoft mode. And newer versions (Version 1.0 and later (?)) can

then make this information available to other programs. For this to

work, you need to run gpm with the -R tag, like this:

 

gpm -R -t ms

 

This will make gpm re-export the mouse data to a new device, called

devgpmdata, which looks like a mouse to any other program. Note

that this device always uses the MouseSystems protocol. You can then

set your Xconfig to use this instead of devmouse as shown below, but

of course you must ensure gpm is always running when you use X. Some

people have reported that some middle-button events are not correctly

interpreted by X using this technique, this may be down to an individ≠

ual mouse setup.

 

Changing button mapping for gpm and X (gustafso@math.utah.edu)

 

You may find that gpm uses different default button mappings to X, so

using both systems on the same machine can be confusing. To make X

use the same buttons for select and paste operations as gpm, use the X

command

 

xmodmap -e “pointer = 1 3 2”

 

which causes the left button to select and the right button to paste,

for either 2-button or 3-button mice. To force gpm to use the X stan≠

dard button mapping, start it with a -B command, eg:

 

gpm -t msc -B 132

9. Using two mice

In some cases, for instance a laptop with a built-in pointing device,

you may wish to use a serial mouse as a second device. In most cases

the built-in device uses the PS/2 protocol, and can be ignored if you

don’t wish to use it. Simply configure gpm or X to use devttyS0 (or

whatever) as usual.

 

To use both at once, you can use gpm -M to re-export the devices.

More details in the gpm man page. Also, XFree 3.3.1 and later support

muliple input devices, using the XInput mechanism. Auto-generated

XF86Config files should have the necessary comments in them.

10. XF86Config and Xconfig file examples

The location of your configuration file for X depends on the

particular release and distribution you have. It will probably be

either etcXconfig, etcXF86Config or usrX11/lib/X11/XF86Config.

You should see which one it is when you start X - it will be echoed to

the screen before all the options are displayed. The syntax is

slightly different between the XF86Config and Xconfig files, so both

are given.

 

Microsoft Serial Mouse

 

∑ XF86config:

 

Section “Pointer”

Protocol “microsoft”

Device “devmouse”

EndSection

 

∑ Xconfig:

#

# Mouse definition and related parameters

#

Microsoft “devmouse”

 

Microsoft Serial Mouse with Three Button Emulation

 

∑ XF86config:

 

Section “Pointer”

Protocol “microsoft”

Device “devmouse”

Emulate3Buttons

EndSection

 

∑ Xconfig:

#

# Mouse definition and related parameters

#

Microsoft “devmouse”

Emulate3Buttons

 

MouseSystems Three Button Serial Mouse

 

∑ XF86config:

 

Section “Pointer”

Protocol “mousesystems”

Device “devmouse”

ClearDTR # These two lines probably won’t be needed,

ClearRTS # try without first and then just the DTR

EndSection

 

∑ Xconfig:

#

# Mouse definition and related parameters

#

MouseSystems “devmouse”

ClearDTR # These two lines probably won’t be needed,

ClearRTS # try without first and then just the DTR

 

Microsoft Serial Mouse with gpm -R

 

∑ XF86config:

 

Section “Pointer”

Protocol “MouseSystems”

Device “devgpmdata”

EndSection

 

∑ Xconfig:

#

# Mouse definition and related parameters

#

MouseSystems “devgpmdata”

11. Cables, extensions and adaptors

The only wires needed in a mouse cable are as follows: TxD and RxD for

data transfer, RTS and/or DTR for power sources, and ground.

Translated into pin numbers, they are:

 

9-pin port 25-pin port

TxD 3 2

RxD 2 3

RTS 7 4

DTR 4 20

Gnd 5 7

 

The above table may be of use if you wish to make adaptors between 9-and 25-pin plugs, or extension cables.

12. Miscellaneous Problems and Setups

∑ If you have trouble with your mouse in X or console mode, check you

are not running a getty on the serial line, or anything else such

as a modem for that matter. Also check for IRQ conflicts.

 

∑ It is possible that you need to hold down the left button when

booting X windows. Some systems may send some sort of signal or

spike to the mouse when X starts.

 

∑ Problems with serial devices may be due to the serial port not

being initialised correctly at boot. This is done by the setserial

command, run from the startup script etcrc.d/rc.serial. Check

the man page for setserial and the Serial-HOWTO for more details.

It may be worth a little experimentation with types, for instance

try setserial devmouse uart 16550 or 16550a regardless of what

port you actually have. (For instance, mice don’t like the

16c550AF).

 

∑ The ClearDTR flag may not work properly on some systems, unless you

disable the RTS/CTS handshaking with the command:

 

stty -crtscts < devmouse

 

(Tested on UART 16450/Pentium by Vladimir Geogjaev geog≠

jaev@wave.sio.rssi.ru)

 

∑ 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 devmouse 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 move with the mouse

instead of scrolling down. (From: chang@platform.com)

 

∑ Swapping buttons: use the xmodmap command to change which physical

button registers as each mouse click. eg: xmodmap -e “pointer = 3

2 1” will turn round the buttons for use in the left hand. If you

only have a two-button mouse then it’s just numbers 1 & 2.

 

∑ Acceleration: use the xset m command to change the mouse settings.

eg xset m 2 will set the acceleration to 2. Look at the manpage

for full details.

 

∑ Pointer offset: If the click action appears to be coming from the

left or right of where the cursor is, it may be that your screen is

not aligned. This is a problem with the S3 driver, which you may be

able to fix using xvidtune. Try InvertVCLK/InvertVCLK, or EarlySC.

This info from Bill Lavender (lavender@MCS.COM) and Simon Hargrave.

In the XF86Config, it might look like this:

 

Subsection “Display”

Modes “1024x768” “800x600” “640x480” “1280x1024”

InvertVCLK “*” 1

 

∑ If you are getting `bouncing’ of the mouse buttons, ie two clicks

when you only wanted one, there may be something wrong with the

mouse. This problem has been solved for Logitech mice by Bob

Nichols (rnichols@interaccess.com) and involves soldering some

resistors and a chip in the mouse to debounce the microswitches.

 

∑ If some users cannot get the mouse to work but some (eg root) can,

it is possible that the users are not running exactly the same

thing - for instance a different version of X or a different

Xconfig. Check the X startup messages carefully to make sure.

 

∑ If you find the mouse pointer is erasing things from your screen,

you have a server config problem. Try adding the option linear, or

maybe nolinear to the graphics card section, or if it is a PCI

board, the options tgui-pci-write-off and tgui-pci-read-off. (This

seems to be a Trident Card problem.)

 

∑ If the mouse cursor doesn’t show up on the screen, but otherwise

seems to be working, try the option “sw-cursor” in the Device

section of the config file.

 

∑ If your mouse stops working when its sunny or when you turn a light

on, it may be that the sensors are being swamped by light getting

through the case. You could try painting the inside of the case

black, or putting some card in the top.

 

∑ Microsoft Brand mice are often a cause of problems. The newest

“Microsoft Serial Mouse 2.1A” has been reported not to work on

many systems, although unplugging it and plugging it in again may

help. gpm version 1.13 and higher should also support 2.1A mice,

using the pnp mouse type. (See the gpm section for how to re-export this.) The “Microsoft Intellimouse” also causes problems,

although it should now be supported by XFree version 3.3 and later.

13. Models Tested

There are a lot of different mice out there, and I cannot honestly say

that you should go out and buy one rather than the other. What I can

do is give a list of what I think these mice do, based on experience

and heresay. Even with this information you should be a little

cautious - we had two identical mice in our office on two computers,

some things worked on one and not t’other! Any additions to this list

would be welcome.

 

Mouse Systems optical mouse, serial version

 

Works well (as you might expect from the name!) without ClearDTR or

 

ClearRTS in the config.

 

WiN mouse, as sold by Office World for eight quid.

 

Standard dual-mode Microsoft/MouseSystems.

 

Agiler Mouse 2900

 

Standard dual-mode Microsoft/MouseSystems. SYSGRATION SYS2005 chip is

 

solderable.

 

Sicos mouse,

 

Works ok, needs ClearDTR & Clear RTS in config.

 

Index sell a mouse for 10 quid,

 

Doesn’t work in 3 button mode, but does have nice instructions :-)

 

Artec mouse

 

Usual dual-protocol mouse, needs `ClearDTR’ set in config, NOT

 

`ClearRTS’

 

DynaPoint 3 button serial mouse.

 

Usual dual-protocol mouse, needs `ClearDTR’ AND `ClearRTS’ in Xconfig.

 

Genius Easymouse 3 button mouse

 

Works fine with Mouseman protocol without the ChordMiddle parameter

 

set. From Roderick Johnstone (rmj@ast.cam.ac.uk)

 

Truemouse, made in Taiwan

 

Works OK, needs `ClearDTR’ in config. (From Tim MacEachern)

 

Champ brand mouse

 

Needs to have switch in PC mode, which enables MouseSystems protocol

 

also. (From tnugent@gucis.cit.gu.edu.au)

 

MicroSpeed mouse

 

Usual dual-protocol mouse.

 

Venus brand ($7)

 

Has a jumper inside to switch between 2 and 3 button mode. (From

 

mhoward@mth.com )

 

Saturn

 

Switched mouse, works OK as MouseSystems in 3-button position. (From

 

grant@oj.rsmas.miami.edu .)

 

Manhattan mouse.

 

Switch for `MS AM’ / `PC AT’ modes, MS mode works fine with the gpm -R

 

method. (From komanec@umel.fee.vutbr.cz).

 

Inland mouse.

 

Switch for `PC/MS’ modes, works fine. (From

 

http://ptsg.eecs.berkeley.edu/~venkates).

 

qMouse (3-button), FCC ID E6qmouse X31.

 

Sells in the USA for about $10. Works with `gpm -t msc -r 20’. No

 

jumpers or switches for MouseSystems 3-button mode. Unreliable in X.

 

Does not respond to echo “*n” > devmouse.

 

Mitsumi Mouse (2-button), FCC ID EW4ECM-S3101.

 

Sells in the USA for about $12. Reliable in X and under gpm, smooth

1 2 3
Go to page:

Free ebook «The 3 Button Serial Mouse mini-HOWTO by Geoff Short (motivational books for women .txt) 📖» - read online now

Comments (0)

There are no comments yet. You can be the first!
Add a comment