xref: /freebsd/usr.sbin/moused/moused.8 (revision 9e65e45b7f30b52e14ef8499d3e4fea8d3f4e525)
194a804c5SMike Pritchard.\" Copyright (c) 1996
294a804c5SMike Pritchard.\"	Mike Pritchard <mpp@FreeBSD.org>.  All rights reserved.
394a804c5SMike Pritchard.\"
494a804c5SMike Pritchard.\" Redistribution and use in source and binary forms, with or without
594a804c5SMike Pritchard.\" modification, are permitted provided that the following conditions
694a804c5SMike Pritchard.\" are met:
794a804c5SMike Pritchard.\" 1. Redistributions of source code must retain the above copyright
894a804c5SMike Pritchard.\"    notice, this list of conditions and the following disclaimer.
994a804c5SMike Pritchard.\" 2. Redistributions in binary form must reproduce the above copyright
1094a804c5SMike Pritchard.\"    notice, this list of conditions and the following disclaimer in the
1194a804c5SMike Pritchard.\"    documentation and/or other materials provided with the distribution.
1294a804c5SMike Pritchard.\" 3. All advertising materials mentioning features or use of this software
1394a804c5SMike Pritchard.\"    must display the following acknowledgement:
1494a804c5SMike Pritchard.\"	This product includes software developed by Mike Pritchard.
1594a804c5SMike Pritchard.\" 4. Neither the name of the author nor the names of its contributors
1694a804c5SMike Pritchard.\"    may be used to endorse or promote products derived from this software
1794a804c5SMike Pritchard.\"    without specific prior written permission.
1894a804c5SMike Pritchard.\"
1994a804c5SMike Pritchard.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2094a804c5SMike Pritchard.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2194a804c5SMike Pritchard.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2294a804c5SMike Pritchard.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2394a804c5SMike Pritchard.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2494a804c5SMike Pritchard.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2594a804c5SMike Pritchard.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2694a804c5SMike Pritchard.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2794a804c5SMike Pritchard.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2894a804c5SMike Pritchard.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2994a804c5SMike Pritchard.\" SUCH DAMAGE.
3094a804c5SMike Pritchard.\"
319e65e45bSKazutaka YOKOTA.\"	$Id: moused.8,v 1.18 1998/11/20 11:22:16 yokota Exp $
325cf470d6SWolfram Schneider.\"
335f436cfbSKazutaka YOKOTA.Dd December 3, 1997
3494a804c5SMike Pritchard.Dt MOUSED 8
3594a804c5SMike Pritchard.Os FreeBSD
3694a804c5SMike Pritchard.Sh NAME
3794a804c5SMike Pritchard.Nm moused
385f436cfbSKazutaka YOKOTA.Nd pass mouse data to the console driver
3994a804c5SMike Pritchard.Sh SYNOPSIS
4094a804c5SMike Pritchard.Nm
415f436cfbSKazutaka YOKOTA.Op Fl 3DPRcdfs
42f82812a2SKazutaka YOKOTA.Op Fl I Ar file
435f436cfbSKazutaka YOKOTA.Op Fl F Ar rate
445f436cfbSKazutaka YOKOTA.Op Fl r Ar resolution
4594a804c5SMike Pritchard.Op Fl S Ar baudrate
465f436cfbSKazutaka YOKOTA.Op Fl C Ar threshold
475f436cfbSKazutaka YOKOTA.Op Fl m Ar N=M
489fb1d70cSKazutaka YOKOTA.Op Fl w Ar N
495f436cfbSKazutaka YOKOTA.Op Fl z Ar target
505f436cfbSKazutaka YOKOTA.Op Fl t Ar mousetype
5194a804c5SMike Pritchard.Fl p Ar port
5294a804c5SMike Pritchard.Pp
535f436cfbSKazutaka YOKOTA.Nm
545f436cfbSKazutaka YOKOTA.Op Fl Pd
555f436cfbSKazutaka YOKOTA.Fl p Ar port
565f436cfbSKazutaka YOKOTA.Fl i Ar info
575f436cfbSKazutaka YOKOTA.Sh DESCRIPTION
585f436cfbSKazutaka YOKOTAThe mouse daemon
595f436cfbSKazutaka YOKOTA.Nm
605f436cfbSKazutaka YOKOTAand the console driver work together to support
615f436cfbSKazutaka YOKOTAmouse operation in the text console and user programs.
625f436cfbSKazutaka YOKOTAThey virtualize the mouse and provide user programs with mouse data
635f436cfbSKazutaka YOKOTAin the standard format
645f436cfbSKazutaka YOKOTA.Pq see Xr sysmouse 4 .
655f436cfbSKazutaka YOKOTA.Pp
665f436cfbSKazutaka YOKOTAThe mouse daemon listens to the specified port for mouse data,
675f436cfbSKazutaka YOKOTAinterprets and then passes it via ioctls to the console driver.
685f436cfbSKazutaka YOKOTAThe mouse daemon
695f436cfbSKazutaka YOKOTAreports translation movement, button press/release
705f436cfbSKazutaka YOKOTAevents and movement of the roller or the wheel if available.
715f436cfbSKazutaka YOKOTAThe roller/wheel movement is reported as ``Z'' axis movement.
725f436cfbSKazutaka YOKOTA.Pp
735f436cfbSKazutaka YOKOTAThe console driver will display the mouse pointer on the screen
745f436cfbSKazutaka YOKOTAand provide cut and paste functions if the mouse pointer is enabled
755f436cfbSKazutaka YOKOTAin the virtual console via
765f436cfbSKazutaka YOKOTA.Xr vidcontrol 4 .
775f436cfbSKazutaka YOKOTAIf
785f436cfbSKazutaka YOKOTA.Xr sysmouse 4
795f436cfbSKazutaka YOKOTAis opened by the user program, the console driver also passes the mouse
805f436cfbSKazutaka YOKOTAdata to the device so that the user program will see it.
815f436cfbSKazutaka YOKOTA.Pp
825f436cfbSKazutaka YOKOTAIf the mouse daemon receives the signal
835f436cfbSKazutaka YOKOTA.Dv SIGHUP ,
845f436cfbSKazutaka YOKOTAit will reopen the mouse port and reinitializes itself. Useful if
855f436cfbSKazutaka YOKOTAthe mouse is attached/detached while the system is suspended.
865f436cfbSKazutaka YOKOTA.Pp
875f436cfbSKazutaka YOKOTAThe following options are available:
8894a804c5SMike Pritchard.Bl -tag -width indent
895f436cfbSKazutaka YOKOTA.It Fl 3
905f436cfbSKazutaka YOKOTAEmulate the third (middle) button for 2-button mice. It is emulated
915f436cfbSKazutaka YOKOTAby pressing the left and right physical buttons simultaneously.
925f436cfbSKazutaka YOKOTA.It Fl C Ar threshold
935f436cfbSKazutaka YOKOTASet double click speed as the maximum interval in msec between button clicks.
945f436cfbSKazutaka YOKOTAWithout this option, the default value of 500 msec will be assumed.
955f436cfbSKazutaka YOKOTAThis option will have effect only on the cut and paste operations
965f436cfbSKazutaka YOKOTAin the text mode console. The user program which is reading mouse data
975f436cfbSKazutaka YOKOTAvia
985f436cfbSKazutaka YOKOTA.Xr sysmouse 4
995f436cfbSKazutaka YOKOTAwon't be affected.
10094a804c5SMike Pritchard.It Fl D
10194a804c5SMike PritchardLower DTR on the serial port.
1025f436cfbSKazutaka YOKOTAThis option is valid only if
1035f436cfbSKazutaka YOKOTA.Ar mousesystems
1045f436cfbSKazutaka YOKOTAis selected as the protocol type.
1055f436cfbSKazutaka YOKOTAThe DTR line may need to be dropped for a 3-button mouse
1065f436cfbSKazutaka YOKOTAto operate in the
1075f436cfbSKazutaka YOKOTA.Ar mousesystems
1085f436cfbSKazutaka YOKOTAmode.
1095f436cfbSKazutaka YOKOTA.It Fl F Ar rate
1105f436cfbSKazutaka YOKOTASet the report rate (reports/sec) of the device if supported.
111f82812a2SKazutaka YOKOTA.It Fl I Ar file
112f82812a2SKazutaka YOKOTAWrite the process id of the
113f82812a2SKazutaka YOKOTA.Nm
114f82812a2SKazutaka YOKOTAdaemon in the specified file.
115f82812a2SKazutaka YOKOTAWithout this option, the process id will be stored in
116f82812a2SKazutaka YOKOTA.Pa /var/run/moused.pid .
1175f436cfbSKazutaka YOKOTA.It Fl P
1185f436cfbSKazutaka YOKOTADo not start the Plug and Play COM device enumeration procedure
1195f436cfbSKazutaka YOKOTAwhen identifying the serial mouse.
1205f436cfbSKazutaka YOKOTAIf this option is given together with the
1215f436cfbSKazutaka YOKOTA.Fl i
1225f436cfbSKazutaka YOKOTAoption, the
1235f436cfbSKazutaka YOKOTA.Nm
12465b81961SKazutaka YOKOTAcommand won't be able to print useful information for the serial mouse.
12594a804c5SMike Pritchard.It Fl R
12694a804c5SMike PritchardLower RTS on the serial port.
1275f436cfbSKazutaka YOKOTAThis option is valid only if
1285f436cfbSKazutaka YOKOTA.Ar mousesystems
1295f436cfbSKazutaka YOKOTAis selected as the protocol type by the
1305f436cfbSKazutaka YOKOTA.Fl t
1315f436cfbSKazutaka YOKOTAoption below. It is often used with the
1325f436cfbSKazutaka YOKOTA.Fl D
1335f436cfbSKazutaka YOKOTAoption above. Both RTS and DTR lines may need to be dropped for
1345f436cfbSKazutaka YOKOTAa 3-button mouse to operate in the
1355f436cfbSKazutaka YOKOTA.Ar mousesystems
1365f436cfbSKazutaka YOKOTAmode.
13794a804c5SMike Pritchard.It Fl S Ar baudrate
13894a804c5SMike PritchardSelect the baudrate for the serial port (1200 to 9600).
1395f436cfbSKazutaka YOKOTANot all serial mice support this option.
14094a804c5SMike Pritchard.It Fl c
1415f436cfbSKazutaka YOKOTASome mice report middle button down events
1425f436cfbSKazutaka YOKOTAas if the left and right buttons are pressed. This option handles this.
14394a804c5SMike Pritchard.It Fl d
14494a804c5SMike PritchardEnable debugging messages.
14594a804c5SMike Pritchard.It Fl f
14694a804c5SMike PritchardDo not become a daemon and instead run as a foreground process.
1475f436cfbSKazutaka YOKOTAUseful for testing and debugging.
1485f436cfbSKazutaka YOKOTA.It Fl i Ar info
1495f436cfbSKazutaka YOKOTAPrint specified information and quit.  Available pieces of
1505f436cfbSKazutaka YOKOTAinformation are:
1515f436cfbSKazutaka YOKOTA.Pp
1525f436cfbSKazutaka YOKOTA.Bl -tag -compact -width modelxxx
1535f436cfbSKazutaka YOKOTA.It Ar port
1545f436cfbSKazutaka YOKOTAPort (device file) name, i.e.
1555f436cfbSKazutaka YOKOTA.Pa /dev/cuaa0 ,
1565f436cfbSKazutaka YOKOTA.Pa /dev/mse0
1575f436cfbSKazutaka YOKOTAand
1585f436cfbSKazutaka YOKOTA.Pa /dev/psm0 .
1595f436cfbSKazutaka YOKOTA.It Ar if
1605f436cfbSKazutaka YOKOTAInterface type: serial, bus, inport or ps/2.
1615f436cfbSKazutaka YOKOTA.It Ar type
1625f436cfbSKazutaka YOKOTAProtocol type. It is one of the types listed under the
1635f436cfbSKazutaka YOKOTA.Fl t
1645f436cfbSKazutaka YOKOTAoption below or
1655f436cfbSKazutaka YOKOTA.Ar sysmouse
1665f436cfbSKazutaka YOKOTAif the driver supports the
1675f436cfbSKazutaka YOKOTA.Ar sysmouse
1685f436cfbSKazutaka YOKOTAdata format standard.
1695f436cfbSKazutaka YOKOTA.It Ar model
1705f436cfbSKazutaka YOKOTAMouse model.  The
1715f436cfbSKazutaka YOKOTA.Nm
1725f436cfbSKazutaka YOKOTAcommand may not always be able to identify the model.
1735f436cfbSKazutaka YOKOTA.It Ar all
1745f436cfbSKazutaka YOKOTAAll of the above items.  Print port, interface, type and model in this order
1755f436cfbSKazutaka YOKOTAin one line.
1765f436cfbSKazutaka YOKOTA.El
1775f436cfbSKazutaka YOKOTA.Pp
1785f436cfbSKazutaka YOKOTAIf the
1795f436cfbSKazutaka YOKOTA.Nm
1805f436cfbSKazutaka YOKOTAcommand cannot determine the requested information, it prints ``unknown''
1815f436cfbSKazutaka YOKOTAor ``generic''.
1825f436cfbSKazutaka YOKOTA.It Fl m Ar N=M
1835f436cfbSKazutaka YOKOTAAssign the physical button
1845f436cfbSKazutaka YOKOTA.Ar M
1855f436cfbSKazutaka YOKOTAto the logical button
1865f436cfbSKazutaka YOKOTA.Ar N.
1875f436cfbSKazutaka YOKOTAYou may specify as many instances of this option as you like.
1885f436cfbSKazutaka YOKOTAMore than one physical button may be assigned to a logical button at the
1895f436cfbSKazutaka YOKOTAsame time. In this case the logical button will be down,
1905f436cfbSKazutaka YOKOTAif either of the assigned physical buttons is held down.
1915f436cfbSKazutaka YOKOTADo not put space around `='.
19294a804c5SMike Pritchard.It Fl p Ar port
19394a804c5SMike PritchardUse
19494a804c5SMike Pritchard.Ar port
1955f436cfbSKazutaka YOKOTAto communicate with the mouse.
1965f436cfbSKazutaka YOKOTA.It Fl r Ar resolution
1975f436cfbSKazutaka YOKOTASet the resolution of the device; in Dots Per Inch, or
1985f436cfbSKazutaka YOKOTA.Ar low ,
1995f436cfbSKazutaka YOKOTA.Ar medium-low ,
2005f436cfbSKazutaka YOKOTA.Ar medium-high
2015f436cfbSKazutaka YOKOTAor
2025f436cfbSKazutaka YOKOTA.Ar high .
2035f436cfbSKazutaka YOKOTAThis option may not be supported by all the device.
20494a804c5SMike Pritchard.It Fl s
20594a804c5SMike PritchardSelect a baudrate of 9600 for the serial line.
2065f436cfbSKazutaka YOKOTANot all serial mice support this option.
2075f436cfbSKazutaka YOKOTA.It Fl t Ar type
208f8b013e2SKazutaka YOKOTASpecify the protocol type of the mouse attached to the port.
20930ee7535SKazutaka YOKOTAYou may explicitly specify a type listed below, or use
21030ee7535SKazutaka YOKOTA.Ar auto
21130ee7535SKazutaka YOKOTAto let the
212f8b013e2SKazutaka YOKOTA.Nm
21330ee7535SKazutaka YOKOTAcommand to automatically select an appropriate protocol for the given
21430ee7535SKazutaka YOKOTAmouse.
21530ee7535SKazutaka YOKOTAIf you entirely ommit this options in the command line,
21630ee7535SKazutaka YOKOTA.Fl t Ar auto
21730ee7535SKazutaka YOKOTAis assumed.
21830ee7535SKazutaka YOKOTAUnder normal circumstances,
21930ee7535SKazutaka YOKOTAyou need to use this option only if the
22030ee7535SKazutaka YOKOTA.Nm
22130ee7535SKazutaka YOKOTAcommand is not able to detect the protocol automatically
222f8b013e2SKazutaka YOKOTA.Pq see the Sx Configuring Mouse Daemon .
223f8b013e2SKazutaka YOKOTA.Pp
2249e65e45bSKazutaka YOKOTANote that if a protocol type is specified with this option, the
22530ee7535SKazutaka YOKOTA.Fl P
22630ee7535SKazutaka YOKOTAoption above is implied and Plug and Play COM device enumeration
22730ee7535SKazutaka YOKOTAprocedure will be disabled.
22830ee7535SKazutaka YOKOTA.Pp
2299e65e45bSKazutaka YOKOTAAlso note that if your mouse is attached to the PS/2 mouse port, you should
2309e65e45bSKazutaka YOKOTAalways choose
2319e65e45bSKazutaka YOKOTA.Ar auto
2329e65e45bSKazutaka YOKOTAor
2339e65e45bSKazutaka YOKOTA.Ar ps/2 ,
2349e65e45bSKazutaka YOKOTAregardless of the brand and model of the mouse.  Likewise, if your
2359e65e45bSKazutaka YOKOTAmouse is attached to the bus mouse port, choose
2369e65e45bSKazutaka YOKOTA.Ar auto
2379e65e45bSKazutaka YOKOTAor
2389e65e45bSKazutaka YOKOTA.Ar busmouse .
2399e65e45bSKazutaka YOKOTASerial mouse protocols will not work with these mice.
2409e65e45bSKazutaka YOKOTA.Pp
241f8b013e2SKazutaka YOKOTAValid types for this option are
2425f436cfbSKazutaka YOKOTAlisted below.
24394a804c5SMike Pritchard.Pp
2445f436cfbSKazutaka YOKOTAFor the serial mouse:
24594a804c5SMike Pritchard.Bl -tag -compact -width mousesystemsxxx
2465f436cfbSKazutaka YOKOTA.It Ar microsoft
2475f436cfbSKazutaka YOKOTAMicrosoft serial mouse protocol.  Most 2-button serial mice use this protocol.
2485f436cfbSKazutaka YOKOTA.It Ar intellimouse
2495f436cfbSKazutaka YOKOTAMicrosoft IntelliMouse protocol.  Genius NetMouse, ASCII Mie Mouse,
2505f436cfbSKazutaka YOKOTALogitech MouseMan+ and FirstMouse+ use this protocol too.
2515f436cfbSKazutaka YOKOTAOther mice with a roller/wheel may be compatible with this protocol.
2525f436cfbSKazutaka YOKOTA.It Ar mousesystems
2535f436cfbSKazutaka YOKOTAMouseSystems 5-byte protocol.  3-button mice may use this protocol.
2545f436cfbSKazutaka YOKOTA.It Ar mmseries
2555f436cfbSKazutaka YOKOTAMM Series mouse protocol.
2565f436cfbSKazutaka YOKOTA.It Ar logitech
2575f436cfbSKazutaka YOKOTALogitech mouse protocol.  Note that this is for old Logitech models.
2585f436cfbSKazutaka YOKOTA.Ar mouseman
2595f436cfbSKazutaka YOKOTAor
2605f436cfbSKazutaka YOKOTA.Ar intellimouse
2615f436cfbSKazutaka YOKOTAshould be specified for newer models.
2625f436cfbSKazutaka YOKOTA.It Ar mouseman
2635f436cfbSKazutaka YOKOTALogitech MouseMan and TrackMan protocol.  Some 3-button mice may be compatible
2645f436cfbSKazutaka YOKOTAwith this protocol.  Note that MouseMan+ and FirstMouse+ use
2655f436cfbSKazutaka YOKOTA.Ar intellimouse
2665f436cfbSKazutaka YOKOTAprotocol rather than this one.
2675f436cfbSKazutaka YOKOTA.It Ar glidepoint
2685f436cfbSKazutaka YOKOTAALPS GlidePoint protocol.
2695f436cfbSKazutaka YOKOTA.It Ar thinkingmouse
2705f436cfbSKazutaka YOKOTAKensington ThinkingMouse protocol.
271929cbbf2SDoug White.It Ar mmhitab
2725f436cfbSKazutaka YOKOTAHitachi tablet protocol.
27367978692SAmancio Hasty.It Ar x10mouseremote
27467978692SAmancio HastyX10 MouseRemote.
2751b11ca6cSKazutaka YOKOTA.It Ar kidspad
2761b11ca6cSKazutaka YOKOTAGenius Kidspad and Easypad protocol.
27794a804c5SMike Pritchard.El
2785f436cfbSKazutaka YOKOTA.Pp
2795f436cfbSKazutaka YOKOTAFor the bus and InPort mouse:
2805f436cfbSKazutaka YOKOTA.Bl -tag -compact -width mousesystemsxxx
2815f436cfbSKazutaka YOKOTA.It Ar busmouse
2825f436cfbSKazutaka YOKOTAThis is the only protocol type available for
2835f436cfbSKazutaka YOKOTAthe bus and InPort mouse and should be specified for any bus mice
2845f436cfbSKazutaka YOKOTAand InPort mice, regardless of the brand.
2855f436cfbSKazutaka YOKOTA.El
2865f436cfbSKazutaka YOKOTA.Pp
2875f436cfbSKazutaka YOKOTAFor the PS/2 mouse:
2885f436cfbSKazutaka YOKOTA.Bl -tag -compact -width mousesystemsxxx
2895f436cfbSKazutaka YOKOTA.It Ar ps/2
2905f436cfbSKazutaka YOKOTAThis is the only protocol type available for the PS/2 mouse
2915f436cfbSKazutaka YOKOTAand should be specified for any PS/2 mice, regardless of the brand.
2925f436cfbSKazutaka YOKOTA.El
2939fb1d70cSKazutaka YOKOTA.It Fl w Ar N
2949fb1d70cSKazutaka YOKOTAMake the physical button
2959fb1d70cSKazutaka YOKOTA.Ar N
2969fb1d70cSKazutaka YOKOTAact as the wheel mode button.
2979fb1d70cSKazutaka YOKOTAWhile this button is pressed, X and Y axis movement is reported to be zero
2989fb1d70cSKazutaka YOKOTAand the Y axis movement is mapped to Z axis.
2999fb1d70cSKazutaka YOKOTAYou may further map the Z axis movement to virtual buttons by the
3009fb1d70cSKazutaka YOKOTA.Fl z
3019fb1d70cSKazutaka YOKOTAoption below.
3025f436cfbSKazutaka YOKOTA.It Fl z Ar target
3035f436cfbSKazutaka YOKOTAMap Z axis (roller/wheel) movement to another axis or to virtual buttons.
3045f436cfbSKazutaka YOKOTAValid
3055f436cfbSKazutaka YOKOTA.Ar target
3065f436cfbSKazutaka YOKOTAmaybe:
3075f436cfbSKazutaka YOKOTA.Bl -tag -compact -width x__
3085f436cfbSKazutaka YOKOTA.It Ar x
3095f436cfbSKazutaka YOKOTA.It Ar y
3105f436cfbSKazutaka YOKOTAX or Y axis movement will be reported when the Z axis movement is detected.
3115f436cfbSKazutaka YOKOTA.It Ar N
3125f436cfbSKazutaka YOKOTAReport the virtual buttons
3135f436cfbSKazutaka YOKOTA.Ar N
3145f436cfbSKazutaka YOKOTAand
3155f436cfbSKazutaka YOKOTA.Ar N+1
3165f436cfbSKazutaka YOKOTAdown events respectively when negative and positive Z axis movement
3175f436cfbSKazutaka YOKOTAis detected. There doesn't need to be physical buttons
3185f436cfbSKazutaka YOKOTA.Ar N
3195f436cfbSKazutaka YOKOTAand
3205f436cfbSKazutaka YOKOTA.Ar N+1 .
3215f436cfbSKazutaka YOKOTANote that mapping to logical buttons is carried out after mapping
3225f436cfbSKazutaka YOKOTAfrom the Z axis movement to the virtual buttons is done.
3235f436cfbSKazutaka YOKOTA.El
3245f436cfbSKazutaka YOKOTA.El
325f8b013e2SKazutaka YOKOTA.Ss Configuring Mouse Daemon
3265f436cfbSKazutaka YOKOTAThe first thing you need to know is the interface type
3275f436cfbSKazutaka YOKOTAof the mouse you are going to use.
3285f436cfbSKazutaka YOKOTAIt can be determined by looking at the connector of the mouse.
3295f436cfbSKazutaka YOKOTAThe serial mouse has a D-Sub female 9- or 25-pin connector.
3305f436cfbSKazutaka YOKOTAThe bus and InPort mice have either a D-Sub male 9-pin connector
3315f436cfbSKazutaka YOKOTAor a round DIN 9-pin connector.
3325f436cfbSKazutaka YOKOTAThe PS/2 mouse is equipped with a small, round DIN 6-pin connector.
3335f436cfbSKazutaka YOKOTASome mice come with adapters with which the connector can
3345f436cfbSKazutaka YOKOTAbe converted to another.  If you are to use such an adapter,
3355f436cfbSKazutaka YOKOTAremember the connector at the very end of the mouse/adapter pair is
3365f436cfbSKazutaka YOKOTAwhat matters.
3375f436cfbSKazutaka YOKOTA.Pp
3385f436cfbSKazutaka YOKOTAThe next thing to decide is a port to use for the given interface.
3395f436cfbSKazutaka YOKOTAFor the bus, InPort and PS/2 mice, there is little choice:
3405f436cfbSKazutaka YOKOTAthe bus and InPort mice always use
3415f436cfbSKazutaka YOKOTA.Pa /dev/mse0 ,
3425f436cfbSKazutaka YOKOTAand the PS/2 mouse is always at
3435f436cfbSKazutaka YOKOTA.Pa /dev/psm0 .
3445f436cfbSKazutaka YOKOTAThere may be more than one serial port to which the serial
3455f436cfbSKazutaka YOKOTAmouse can be attached.  Many people often assign the first, built-in
3465f436cfbSKazutaka YOKOTAserial port
3475f436cfbSKazutaka YOKOTA.Pa /dev/cuaa0
3485f436cfbSKazutaka YOKOTAto the mouse.
3495f436cfbSKazutaka YOKOTAYou may want to create a symbolic link
3505f436cfbSKazutaka YOKOTA.Pa /dev/mouse
3515f436cfbSKazutaka YOKOTApointing to the real port to which the mouse is connected, so that you
3525f436cfbSKazutaka YOKOTAcan easily distinguish which is your ``mouse'' port later.
3535f436cfbSKazutaka YOKOTA.Pp
3545f436cfbSKazutaka YOKOTAThe next step is to guess the appropriate protocol type for the mouse.
3555f436cfbSKazutaka YOKOTAThe
3565f436cfbSKazutaka YOKOTA.Nm
3575f436cfbSKazutaka YOKOTAcommand may be able to automatically determine the protocol type.
3585f436cfbSKazutaka YOKOTARun the
3595f436cfbSKazutaka YOKOTA.Nm
3605f436cfbSKazutaka YOKOTAcommand with the
3615f436cfbSKazutaka YOKOTA.Fl i
3625f436cfbSKazutaka YOKOTAoption and see what it says.  If the command can identify
3635f436cfbSKazutaka YOKOTAthe protocol type, no further investigation is necessary on your part.
3645f436cfbSKazutaka YOKOTAYou may start the daemon without explicitly specifying a protocol type
3655f436cfbSKazutaka YOKOTA.Pq see Sx EXAMPLE .
3665f436cfbSKazutaka YOKOTA.Pp
3675f436cfbSKazutaka YOKOTAThe command may print
3685f436cfbSKazutaka YOKOTA.Ar sysmouse
3695f436cfbSKazutaka YOKOTAif the mouse driver supports this protocol type.
3705f436cfbSKazutaka YOKOTA.Pp
3715f436cfbSKazutaka YOKOTANote that the
3725f436cfbSKazutaka YOKOTA.Dv type
3735f436cfbSKazutaka YOKOTAand
3745f436cfbSKazutaka YOKOTA.Dv model
3755f436cfbSKazutaka YOKOTAprinted by the
3765f436cfbSKazutaka YOKOTA.Fl i
3775f436cfbSKazutaka YOKOTAoption do not necessarily match the product name of the pointing device
3785f436cfbSKazutaka YOKOTAin question, but they may give the name of the device with which it is
3795f436cfbSKazutaka YOKOTAcompatible.
3805f436cfbSKazutaka YOKOTA.Pp
3815f436cfbSKazutaka YOKOTAIf the
3825f436cfbSKazutaka YOKOTA.Fl i
3835f436cfbSKazutaka YOKOTAoption yields nothing, you need to specify a protocol type to the
3845f436cfbSKazutaka YOKOTA.Nm
3855f436cfbSKazutaka YOKOTAcommand by the
3865f436cfbSKazutaka YOKOTA.Fl t
3875f436cfbSKazutaka YOKOTAoption. You have to make a guess and try.
3885f436cfbSKazutaka YOKOTAThere is rule of thumb:
3895f436cfbSKazutaka YOKOTA.Pp
3905f436cfbSKazutaka YOKOTA.Bl -tag -compact -width 1.X
3915f436cfbSKazutaka YOKOTA.It 1.
3925f436cfbSKazutaka YOKOTAThe bus and InPort mice always use
3935f436cfbSKazutaka YOKOTA.Ar busmouse
3945f436cfbSKazutaka YOKOTAprotocol regardless of the brand of the mouse.
3955f436cfbSKazutaka YOKOTA.It 2.
3965f436cfbSKazutaka YOKOTAThe
3975f436cfbSKazutaka YOKOTA.Ar ps/2
3985f436cfbSKazutaka YOKOTAprotocol should always be specified for the PS/2 mouse
3995f436cfbSKazutaka YOKOTAregardless of the brand of the mouse.
4005f436cfbSKazutaka YOKOTA.It 3.
4015f436cfbSKazutaka YOKOTAMost 2-button serial mice support the
4025f436cfbSKazutaka YOKOTA.Ar microsoft
4035f436cfbSKazutaka YOKOTAprotocol.
4045f436cfbSKazutaka YOKOTA.It 4.
4055f436cfbSKazutaka YOKOTA3-button serial mice may work with the
4065f436cfbSKazutaka YOKOTA.Ar mousesystems
4075f436cfbSKazutaka YOKOTAprotocol. If it doesn't, it may work with the
4085f436cfbSKazutaka YOKOTA.Ar microsoft
4095f436cfbSKazutaka YOKOTAprotocol although
4105f436cfbSKazutaka YOKOTAthe third (middle) button won't function.
4115f436cfbSKazutaka YOKOTA3-button serial mice may also work with the
4125f436cfbSKazutaka YOKOTA.Ar mouseman
4135f436cfbSKazutaka YOKOTAprotocol under which the third button may function as expected.
4145f436cfbSKazutaka YOKOTA.It 5.
4155f436cfbSKazutaka YOKOTA3-button serial mice may have a small switch to choose between ``MS''
4165f436cfbSKazutaka YOKOTAand ``PC'', or ``2'' and ``3''.
4175f436cfbSKazutaka YOKOTA``MS'' or ``2'' usually mean the
4185f436cfbSKazutaka YOKOTA.Ar microsoft
4195f436cfbSKazutaka YOKOTAprotocol.
4205f436cfbSKazutaka YOKOTA``PC'' or ``3'' will choose the
4215f436cfbSKazutaka YOKOTA.Ar mousesystems
4225f436cfbSKazutaka YOKOTAprotocol.
4235f436cfbSKazutaka YOKOTA.It 6.
4245f436cfbSKazutaka YOKOTAIf the mouse has a roller or a wheel, it may be compatible with the
4255f436cfbSKazutaka YOKOTA.Ar intellimouse
4265f436cfbSKazutaka YOKOTAprotocol.
4275f436cfbSKazutaka YOKOTA.El
4285f436cfbSKazutaka YOKOTA.Pp
4295f436cfbSKazutaka YOKOTATo test if the selected protocol type is correct for the given mouse,
4305f436cfbSKazutaka YOKOTAenable the mouse pointer in the current virtual console,
4315f436cfbSKazutaka YOKOTA.Pp
4325f436cfbSKazutaka YOKOTA.Dl vidcontrol -m on
4335f436cfbSKazutaka YOKOTA.Pp
4345f436cfbSKazutaka YOKOTAstart the mouse daemon in the foreground mode,
4355f436cfbSKazutaka YOKOTA.Pp
4365f436cfbSKazutaka YOKOTA.Dl moused -f -p Ar _selected_port_ -t Ar _selected_protocol_
4375f436cfbSKazutaka YOKOTA.Pp
4385f436cfbSKazutaka YOKOTAand see if the mouse pointer travels correctly
43965b81961SKazutaka YOKOTAaccording to the mouse movement. Then try cut & paste features by
4405f436cfbSKazutaka YOKOTAclicking the left, right and middle buttons. Type ^C to stop
4415f436cfbSKazutaka YOKOTAthe command.
4425f436cfbSKazutaka YOKOTA.Ss Multiple Mice
4435f436cfbSKazutaka YOKOTAAs many instances of the mouse daemon as the number of mice attached to
4445f436cfbSKazutaka YOKOTAthe system may be run simultaneously; one
4455f436cfbSKazutaka YOKOTAinstance for each mouse.
4465f436cfbSKazutaka YOKOTAThis is useful if the user wants to use the built-in PS/2 pointing device
4475f436cfbSKazutaka YOKOTAof a laptop computer while on the road, but wants to use a serial
4485f436cfbSKazutaka YOKOTAmouse when s/he attaches the system to the docking station in the office.
4495f436cfbSKazutaka YOKOTARun two mouse daemons and tell the application program
4505f436cfbSKazutaka YOKOTA.Pq such as the X Window System
4515f436cfbSKazutaka YOKOTAto use
4525f436cfbSKazutaka YOKOTA.Xr sysmouse ,
4535f436cfbSKazutaka YOKOTAthen the application program will always see mouse data from either mice.
4545f436cfbSKazutaka YOKOTAWhen the serial mouse is not attached, the corresponding mouse daemon
4555f436cfbSKazutaka YOKOTAwon't detect any movement or button state change and the application
4565f436cfbSKazutaka YOKOTAprogram will only see mouse data coming from the daemon for the
4575f436cfbSKazutaka YOKOTAPS/2 mouse. In contrast when both mice are attached and both of them
4585f436cfbSKazutaka YOKOTAare moved at the same time in this configuration,
4595f436cfbSKazutaka YOKOTAthe mouse pointer will travel across the screen just as if movement of
4605f436cfbSKazutaka YOKOTAthe mice is combined all together.
4615f436cfbSKazutaka YOKOTA.Sh FILES
4625f436cfbSKazutaka YOKOTA.Bl -tag -width /dev/consolectl -compact
4635f436cfbSKazutaka YOKOTA.It Pa /dev/consolectl
4645f436cfbSKazutaka YOKOTAdevice to control the console
4655f436cfbSKazutaka YOKOTA.It Pa /dev/mse%d
4665f436cfbSKazutaka YOKOTAbus and InPort mouse driver
4675f436cfbSKazutaka YOKOTA.It Pa /dev/psm%d
4685f436cfbSKazutaka YOKOTAPS/2 mouse driver
4695f436cfbSKazutaka YOKOTA.It Pa /dev/sysmouse
4705f436cfbSKazutaka YOKOTAvirtualized mouse driver
4715f436cfbSKazutaka YOKOTA.It Pa /dev/ttyv%d
4725f436cfbSKazutaka YOKOTAvirtual consoles
473f82812a2SKazutaka YOKOTA.It Pa /var/run/moused.pid
474f82812a2SKazutaka YOKOTAprocess id of the currently running
475f82812a2SKazutaka YOKOTA.Nm
476f82812a2SKazutaka YOKOTAdaemon
47767978692SAmancio Hasty.It Pa /var/run/MouseRemote
47867978692SAmancio HastyUNIX-domain stream socket for X10 MouseRemote events
47994a804c5SMike Pritchard.El
480bf29452fSWolfram Schneider.Sh EXAMPLE
481bf29452fSWolfram Schneider.Pp
4825f436cfbSKazutaka YOKOTA.Dl moused -p /dev/cuaa0 -i type
4835f436cfbSKazutaka YOKOTA.Pp
4845f436cfbSKazutaka YOKOTALet the
4855f436cfbSKazutaka YOKOTA.Nm
4865f436cfbSKazutaka YOKOTAcommand determine the protocol type of the mouse at the serial port
4875f436cfbSKazutaka YOKOTA.Pa /dev/cuaa0 .
4885f436cfbSKazutaka YOKOTAIf successful, the command will print the type, otherwise it will say
4895f436cfbSKazutaka YOKOTA``unknown''.
4905f436cfbSKazutaka YOKOTA.Pp
4915f436cfbSKazutaka YOKOTA.Dl moused -p /dev/cuaa0
492bf29452fSWolfram Schneider.Dl vidcontrol -m on
493bf29452fSWolfram Schneider.Pp
4945f436cfbSKazutaka YOKOTAIf the
4955f436cfbSKazutaka YOKOTA.Nm
4965f436cfbSKazutaka YOKOTAcommand is able to identify the protocol type of the mouse at the specified
4975f436cfbSKazutaka YOKOTAport automatically, you can start the daemon without the
4985f436cfbSKazutaka YOKOTA.Fl t
4995f436cfbSKazutaka YOKOTAoption and enable the mouse pointer in the text console as above.
5005f436cfbSKazutaka YOKOTA.Pp
5015f436cfbSKazutaka YOKOTA.Dl moused -p /dev/mouse -t microsoft
5025f436cfbSKazutaka YOKOTA.Dl vidcontrol -m on
5035f436cfbSKazutaka YOKOTA.Pp
5045f436cfbSKazutaka YOKOTAStart the mouse daemon on the serial port
5055f436cfbSKazutaka YOKOTA.Pa /dev/mouse .
5065f436cfbSKazutaka YOKOTAThe protocol type
5075f436cfbSKazutaka YOKOTA.Ar microsoft
5085f436cfbSKazutaka YOKOTAis explicitly specified by the
5095f436cfbSKazutaka YOKOTA.Fl t
5105f436cfbSKazutaka YOKOTAoption.
5115f436cfbSKazutaka YOKOTA.Pp
5125f436cfbSKazutaka YOKOTA.Dl moused -p /dev/mouse -m 1=3 -m 3=1
5135f436cfbSKazutaka YOKOTA.Pp
5145f436cfbSKazutaka YOKOTAAssign the physical button 3 (right button) to the logical button 1
5155f436cfbSKazutaka YOKOTA(logical left) and the physical button 1 (left) to the logical
5165f436cfbSKazutaka YOKOTAbutton 3 (logical right).
5175f436cfbSKazutaka YOKOTAThis will effectively swap the left and right buttons.
5185f436cfbSKazutaka YOKOTA.Pp
5195f436cfbSKazutaka YOKOTA.Dl moused -p /dev/mouse -t intellimouse -z 4
5205f436cfbSKazutaka YOKOTA.Pp
5215f436cfbSKazutaka YOKOTAReport negative Z axis (roller) movement as the button 4 pressed
5225f436cfbSKazutaka YOKOTAand positive Z axis movement as the button 5 pressed.
5235f436cfbSKazutaka YOKOTA.Sh CAVEATS
5245f436cfbSKazutaka YOKOTAThe
5255f436cfbSKazutaka YOKOTA.Nm
5265f436cfbSKazutaka YOKOTAcommand does not currently work with the alternative console driver
5275f436cfbSKazutaka YOKOTA.Xr pcvt 4 .
5285f436cfbSKazutaka YOKOTA.Pp
5295f436cfbSKazutaka YOKOTAMany pad devices behave as if the first (left) button were pressed if
5305f436cfbSKazutaka YOKOTAthe user `taps' the surface of the pad.
5315f436cfbSKazutaka YOKOTAIn contrast, some ALPS GlidePoint pad models treat the tapping action
5325f436cfbSKazutaka YOKOTAas fourth button events. Use the option ``-m 1=4'' for these models
5335f436cfbSKazutaka YOKOTAto obtain the same effect as the other pad devices.
534851c9886SKazutaka YOKOTA.Pp
535851c9886SKazutaka YOKOTACut and paste functions in the virtual console assume that there
536851c9886SKazutaka YOKOTAare three buttons on the mouse.
537851c9886SKazutaka YOKOTAThe logical button 1 (logical left) selects a region of text in the
538851c9886SKazutaka YOKOTAconsole and copies it to the cut buffer.
539851c9886SKazutaka YOKOTAThe logical button 3 (logical right) extends the selected region.
540851c9886SKazutaka YOKOTAThe logical button 2 (logical middle) pastes the selected text
541851c9886SKazutaka YOKOTAat the text cursor position.
542851c9886SKazutaka YOKOTAIf the mouse has only two buttons, the middle, `paste' button
543851c9886SKazutaka YOKOTAis not available.
544851c9886SKazutaka YOKOTATo obtain the paste function, use the
545851c9886SKazutaka YOKOTA.Fl 3
546851c9886SKazutaka YOKOTAoption to emulate the middle button, or use the
547851c9886SKazutaka YOKOTA.Fl m
548851c9886SKazutaka YOKOTAoption to assign the physical right button to the logical middle button:
549851c9886SKazutaka YOKOTA``-m 2=3''.
55094a804c5SMike Pritchard.Sh SEE ALSO
5515f436cfbSKazutaka YOKOTA.Xr kill 1 ,
5525cf470d6SWolfram Schneider.Xr vidcontrol 1 ,
55394a804c5SMike Pritchard.Xr keyboard 4 ,
5545f436cfbSKazutaka YOKOTA.Xr mse 4 ,
55594a804c5SMike Pritchard.Xr pcvt 4 ,
5565f436cfbSKazutaka YOKOTA.Xr psm 4 ,
557b7d50183SWolfram Schneider.Xr screen 4 ,
558b7d50183SWolfram Schneider.Xr sysmouse 4
5595f436cfbSKazutaka YOKOTA.Sh STANDARD
5605f436cfbSKazutaka YOKOTAThe
5615f436cfbSKazutaka YOKOTA.Nm
5625f436cfbSKazutaka YOKOTAcommand partially supports ``Plag and Play External COM Device Specification''
5635f436cfbSKazutaka YOKOTAin order to support PnP serial mice.
5645f436cfbSKazutaka YOKOTAHowever, due to various degrees of conformance to the specification by
5655f436cfbSKazutaka YOKOTAexisting serial mice, it does not strictly follow the version 1.0 of the
5665f436cfbSKazutaka YOKOTAstandard. Even with this less strict approach,
5675f436cfbSKazutaka YOKOTAit may not always determine an appropriate protocol type
5685f436cfbSKazutaka YOKOTAfor the given serial mouse.
56994a804c5SMike Pritchard.Sh AUTHORS
57094a804c5SMike PritchardThe
57194a804c5SMike Pritchard.Nm
57207e1d533SPhilippe Charniercommand was written by
5732dcf9f10SSteve Price.An Michael Smith Aq msmith@FreeBSD.org .
5745f436cfbSKazutaka YOKOTAThis manual page was written by
57507e1d533SPhilippe Charnier.An Mike Pritchard Aq mpp@FreeBSD.org .
5762dcf9f10SSteve PriceThe command and manual page have since been updated by
5772dcf9f10SSteve Price.An Kazutaka Yokota Aq yokota@FreeBSD.org .
57894a804c5SMike Pritchard.Sh HISTORY
57994a804c5SMike PritchardThe
58007e1d533SPhilippe Charnier.Nm
58194a804c5SMike Pritchardcommand first appeared in
58294a804c5SMike Pritchard.Fx 2.2 .
583