xref: /freebsd/usr.sbin/moused/moused.8 (revision 2e09fb67e89913db30db47d06ad0f1bdca62e6a6)
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.\"
312e09fb67SKazutaka YOKOTA.\"	$Id: moused.8,v 1.20 1999/08/14 22:29:34 chris 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
762f2ac2cbSChris Costello.Xr vidcontrol 1 .
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.
2772e09fb67SKazutaka YOKOTA.It Ar versapad
2782e09fb67SKazutaka YOKOTAInterlink VersaPad protocol.
27994a804c5SMike Pritchard.El
2805f436cfbSKazutaka YOKOTA.Pp
2815f436cfbSKazutaka YOKOTAFor the bus and InPort mouse:
2825f436cfbSKazutaka YOKOTA.Bl -tag -compact -width mousesystemsxxx
2835f436cfbSKazutaka YOKOTA.It Ar busmouse
2845f436cfbSKazutaka YOKOTAThis is the only protocol type available for
2855f436cfbSKazutaka YOKOTAthe bus and InPort mouse and should be specified for any bus mice
2865f436cfbSKazutaka YOKOTAand InPort mice, regardless of the brand.
2875f436cfbSKazutaka YOKOTA.El
2885f436cfbSKazutaka YOKOTA.Pp
2895f436cfbSKazutaka YOKOTAFor the PS/2 mouse:
2905f436cfbSKazutaka YOKOTA.Bl -tag -compact -width mousesystemsxxx
2915f436cfbSKazutaka YOKOTA.It Ar ps/2
2925f436cfbSKazutaka YOKOTAThis is the only protocol type available for the PS/2 mouse
2935f436cfbSKazutaka YOKOTAand should be specified for any PS/2 mice, regardless of the brand.
2945f436cfbSKazutaka YOKOTA.El
2959fb1d70cSKazutaka YOKOTA.It Fl w Ar N
2969fb1d70cSKazutaka YOKOTAMake the physical button
2979fb1d70cSKazutaka YOKOTA.Ar N
2989fb1d70cSKazutaka YOKOTAact as the wheel mode button.
2999fb1d70cSKazutaka YOKOTAWhile this button is pressed, X and Y axis movement is reported to be zero
3009fb1d70cSKazutaka YOKOTAand the Y axis movement is mapped to Z axis.
3019fb1d70cSKazutaka YOKOTAYou may further map the Z axis movement to virtual buttons by the
3029fb1d70cSKazutaka YOKOTA.Fl z
3039fb1d70cSKazutaka YOKOTAoption below.
3045f436cfbSKazutaka YOKOTA.It Fl z Ar target
3055f436cfbSKazutaka YOKOTAMap Z axis (roller/wheel) movement to another axis or to virtual buttons.
3065f436cfbSKazutaka YOKOTAValid
3075f436cfbSKazutaka YOKOTA.Ar target
3085f436cfbSKazutaka YOKOTAmaybe:
3095f436cfbSKazutaka YOKOTA.Bl -tag -compact -width x__
3105f436cfbSKazutaka YOKOTA.It Ar x
3115f436cfbSKazutaka YOKOTA.It Ar y
3125f436cfbSKazutaka YOKOTAX or Y axis movement will be reported when the Z axis movement is detected.
3135f436cfbSKazutaka YOKOTA.It Ar N
3145f436cfbSKazutaka YOKOTAReport the virtual buttons
3155f436cfbSKazutaka YOKOTA.Ar N
3165f436cfbSKazutaka YOKOTAand
3175f436cfbSKazutaka YOKOTA.Ar N+1
3185f436cfbSKazutaka YOKOTAdown events respectively when negative and positive Z axis movement
3195f436cfbSKazutaka YOKOTAis detected. There doesn't need to be physical buttons
3205f436cfbSKazutaka YOKOTA.Ar N
3215f436cfbSKazutaka YOKOTAand
3225f436cfbSKazutaka YOKOTA.Ar N+1 .
3235f436cfbSKazutaka YOKOTANote that mapping to logical buttons is carried out after mapping
3245f436cfbSKazutaka YOKOTAfrom the Z axis movement to the virtual buttons is done.
3255f436cfbSKazutaka YOKOTA.El
3265f436cfbSKazutaka YOKOTA.El
327f8b013e2SKazutaka YOKOTA.Ss Configuring Mouse Daemon
3285f436cfbSKazutaka YOKOTAThe first thing you need to know is the interface type
3295f436cfbSKazutaka YOKOTAof the mouse you are going to use.
3305f436cfbSKazutaka YOKOTAIt can be determined by looking at the connector of the mouse.
3315f436cfbSKazutaka YOKOTAThe serial mouse has a D-Sub female 9- or 25-pin connector.
3325f436cfbSKazutaka YOKOTAThe bus and InPort mice have either a D-Sub male 9-pin connector
3335f436cfbSKazutaka YOKOTAor a round DIN 9-pin connector.
3345f436cfbSKazutaka YOKOTAThe PS/2 mouse is equipped with a small, round DIN 6-pin connector.
3355f436cfbSKazutaka YOKOTASome mice come with adapters with which the connector can
3365f436cfbSKazutaka YOKOTAbe converted to another.  If you are to use such an adapter,
3375f436cfbSKazutaka YOKOTAremember the connector at the very end of the mouse/adapter pair is
3385f436cfbSKazutaka YOKOTAwhat matters.
3395f436cfbSKazutaka YOKOTA.Pp
3405f436cfbSKazutaka YOKOTAThe next thing to decide is a port to use for the given interface.
3415f436cfbSKazutaka YOKOTAFor the bus, InPort and PS/2 mice, there is little choice:
3425f436cfbSKazutaka YOKOTAthe bus and InPort mice always use
3435f436cfbSKazutaka YOKOTA.Pa /dev/mse0 ,
3445f436cfbSKazutaka YOKOTAand the PS/2 mouse is always at
3455f436cfbSKazutaka YOKOTA.Pa /dev/psm0 .
3465f436cfbSKazutaka YOKOTAThere may be more than one serial port to which the serial
3475f436cfbSKazutaka YOKOTAmouse can be attached.  Many people often assign the first, built-in
3485f436cfbSKazutaka YOKOTAserial port
3495f436cfbSKazutaka YOKOTA.Pa /dev/cuaa0
3505f436cfbSKazutaka YOKOTAto the mouse.
3515f436cfbSKazutaka YOKOTAYou may want to create a symbolic link
3525f436cfbSKazutaka YOKOTA.Pa /dev/mouse
3535f436cfbSKazutaka YOKOTApointing to the real port to which the mouse is connected, so that you
3545f436cfbSKazutaka YOKOTAcan easily distinguish which is your ``mouse'' port later.
3555f436cfbSKazutaka YOKOTA.Pp
3565f436cfbSKazutaka YOKOTAThe next step is to guess the appropriate protocol type for the mouse.
3575f436cfbSKazutaka YOKOTAThe
3585f436cfbSKazutaka YOKOTA.Nm
3595f436cfbSKazutaka YOKOTAcommand may be able to automatically determine the protocol type.
3605f436cfbSKazutaka YOKOTARun the
3615f436cfbSKazutaka YOKOTA.Nm
3625f436cfbSKazutaka YOKOTAcommand with the
3635f436cfbSKazutaka YOKOTA.Fl i
3645f436cfbSKazutaka YOKOTAoption and see what it says.  If the command can identify
3655f436cfbSKazutaka YOKOTAthe protocol type, no further investigation is necessary on your part.
3665f436cfbSKazutaka YOKOTAYou may start the daemon without explicitly specifying a protocol type
3675f436cfbSKazutaka YOKOTA.Pq see Sx EXAMPLE .
3685f436cfbSKazutaka YOKOTA.Pp
3695f436cfbSKazutaka YOKOTAThe command may print
3705f436cfbSKazutaka YOKOTA.Ar sysmouse
3715f436cfbSKazutaka YOKOTAif the mouse driver supports this protocol type.
3725f436cfbSKazutaka YOKOTA.Pp
3735f436cfbSKazutaka YOKOTANote that the
3745f436cfbSKazutaka YOKOTA.Dv type
3755f436cfbSKazutaka YOKOTAand
3765f436cfbSKazutaka YOKOTA.Dv model
3775f436cfbSKazutaka YOKOTAprinted by the
3785f436cfbSKazutaka YOKOTA.Fl i
3795f436cfbSKazutaka YOKOTAoption do not necessarily match the product name of the pointing device
3805f436cfbSKazutaka YOKOTAin question, but they may give the name of the device with which it is
3815f436cfbSKazutaka YOKOTAcompatible.
3825f436cfbSKazutaka YOKOTA.Pp
3835f436cfbSKazutaka YOKOTAIf the
3845f436cfbSKazutaka YOKOTA.Fl i
3855f436cfbSKazutaka YOKOTAoption yields nothing, you need to specify a protocol type to the
3865f436cfbSKazutaka YOKOTA.Nm
3875f436cfbSKazutaka YOKOTAcommand by the
3885f436cfbSKazutaka YOKOTA.Fl t
3895f436cfbSKazutaka YOKOTAoption. You have to make a guess and try.
3905f436cfbSKazutaka YOKOTAThere is rule of thumb:
3915f436cfbSKazutaka YOKOTA.Pp
3925f436cfbSKazutaka YOKOTA.Bl -tag -compact -width 1.X
3935f436cfbSKazutaka YOKOTA.It 1.
3945f436cfbSKazutaka YOKOTAThe bus and InPort mice always use
3955f436cfbSKazutaka YOKOTA.Ar busmouse
3965f436cfbSKazutaka YOKOTAprotocol regardless of the brand of the mouse.
3975f436cfbSKazutaka YOKOTA.It 2.
3985f436cfbSKazutaka YOKOTAThe
3995f436cfbSKazutaka YOKOTA.Ar ps/2
4005f436cfbSKazutaka YOKOTAprotocol should always be specified for the PS/2 mouse
4015f436cfbSKazutaka YOKOTAregardless of the brand of the mouse.
4025f436cfbSKazutaka YOKOTA.It 3.
4035f436cfbSKazutaka YOKOTAMost 2-button serial mice support the
4045f436cfbSKazutaka YOKOTA.Ar microsoft
4055f436cfbSKazutaka YOKOTAprotocol.
4065f436cfbSKazutaka YOKOTA.It 4.
4075f436cfbSKazutaka YOKOTA3-button serial mice may work with the
4085f436cfbSKazutaka YOKOTA.Ar mousesystems
4095f436cfbSKazutaka YOKOTAprotocol. If it doesn't, it may work with the
4105f436cfbSKazutaka YOKOTA.Ar microsoft
4115f436cfbSKazutaka YOKOTAprotocol although
4125f436cfbSKazutaka YOKOTAthe third (middle) button won't function.
4135f436cfbSKazutaka YOKOTA3-button serial mice may also work with the
4145f436cfbSKazutaka YOKOTA.Ar mouseman
4155f436cfbSKazutaka YOKOTAprotocol under which the third button may function as expected.
4165f436cfbSKazutaka YOKOTA.It 5.
4175f436cfbSKazutaka YOKOTA3-button serial mice may have a small switch to choose between ``MS''
4185f436cfbSKazutaka YOKOTAand ``PC'', or ``2'' and ``3''.
4195f436cfbSKazutaka YOKOTA``MS'' or ``2'' usually mean the
4205f436cfbSKazutaka YOKOTA.Ar microsoft
4215f436cfbSKazutaka YOKOTAprotocol.
4225f436cfbSKazutaka YOKOTA``PC'' or ``3'' will choose the
4235f436cfbSKazutaka YOKOTA.Ar mousesystems
4245f436cfbSKazutaka YOKOTAprotocol.
4255f436cfbSKazutaka YOKOTA.It 6.
4265f436cfbSKazutaka YOKOTAIf the mouse has a roller or a wheel, it may be compatible with the
4275f436cfbSKazutaka YOKOTA.Ar intellimouse
4285f436cfbSKazutaka YOKOTAprotocol.
4295f436cfbSKazutaka YOKOTA.El
4305f436cfbSKazutaka YOKOTA.Pp
4315f436cfbSKazutaka YOKOTATo test if the selected protocol type is correct for the given mouse,
4325f436cfbSKazutaka YOKOTAenable the mouse pointer in the current virtual console,
4335f436cfbSKazutaka YOKOTA.Pp
4345f436cfbSKazutaka YOKOTA.Dl vidcontrol -m on
4355f436cfbSKazutaka YOKOTA.Pp
4365f436cfbSKazutaka YOKOTAstart the mouse daemon in the foreground mode,
4375f436cfbSKazutaka YOKOTA.Pp
4385f436cfbSKazutaka YOKOTA.Dl moused -f -p Ar _selected_port_ -t Ar _selected_protocol_
4395f436cfbSKazutaka YOKOTA.Pp
4405f436cfbSKazutaka YOKOTAand see if the mouse pointer travels correctly
44165b81961SKazutaka YOKOTAaccording to the mouse movement. Then try cut & paste features by
4425f436cfbSKazutaka YOKOTAclicking the left, right and middle buttons. Type ^C to stop
4435f436cfbSKazutaka YOKOTAthe command.
4445f436cfbSKazutaka YOKOTA.Ss Multiple Mice
4455f436cfbSKazutaka YOKOTAAs many instances of the mouse daemon as the number of mice attached to
4465f436cfbSKazutaka YOKOTAthe system may be run simultaneously; one
4475f436cfbSKazutaka YOKOTAinstance for each mouse.
4485f436cfbSKazutaka YOKOTAThis is useful if the user wants to use the built-in PS/2 pointing device
4495f436cfbSKazutaka YOKOTAof a laptop computer while on the road, but wants to use a serial
4505f436cfbSKazutaka YOKOTAmouse when s/he attaches the system to the docking station in the office.
4515f436cfbSKazutaka YOKOTARun two mouse daemons and tell the application program
4525f436cfbSKazutaka YOKOTA.Pq such as the X Window System
4535f436cfbSKazutaka YOKOTAto use
4545f436cfbSKazutaka YOKOTA.Xr sysmouse ,
4555f436cfbSKazutaka YOKOTAthen the application program will always see mouse data from either mice.
4565f436cfbSKazutaka YOKOTAWhen the serial mouse is not attached, the corresponding mouse daemon
4575f436cfbSKazutaka YOKOTAwon't detect any movement or button state change and the application
4585f436cfbSKazutaka YOKOTAprogram will only see mouse data coming from the daemon for the
4595f436cfbSKazutaka YOKOTAPS/2 mouse. In contrast when both mice are attached and both of them
4605f436cfbSKazutaka YOKOTAare moved at the same time in this configuration,
4615f436cfbSKazutaka YOKOTAthe mouse pointer will travel across the screen just as if movement of
4625f436cfbSKazutaka YOKOTAthe mice is combined all together.
4635f436cfbSKazutaka YOKOTA.Sh FILES
4645f436cfbSKazutaka YOKOTA.Bl -tag -width /dev/consolectl -compact
4655f436cfbSKazutaka YOKOTA.It Pa /dev/consolectl
4665f436cfbSKazutaka YOKOTAdevice to control the console
4675f436cfbSKazutaka YOKOTA.It Pa /dev/mse%d
4685f436cfbSKazutaka YOKOTAbus and InPort mouse driver
4695f436cfbSKazutaka YOKOTA.It Pa /dev/psm%d
4705f436cfbSKazutaka YOKOTAPS/2 mouse driver
4715f436cfbSKazutaka YOKOTA.It Pa /dev/sysmouse
4725f436cfbSKazutaka YOKOTAvirtualized mouse driver
4735f436cfbSKazutaka YOKOTA.It Pa /dev/ttyv%d
4745f436cfbSKazutaka YOKOTAvirtual consoles
475f82812a2SKazutaka YOKOTA.It Pa /var/run/moused.pid
476f82812a2SKazutaka YOKOTAprocess id of the currently running
477f82812a2SKazutaka YOKOTA.Nm
478f82812a2SKazutaka YOKOTAdaemon
47967978692SAmancio Hasty.It Pa /var/run/MouseRemote
48067978692SAmancio HastyUNIX-domain stream socket for X10 MouseRemote events
48194a804c5SMike Pritchard.El
482bf29452fSWolfram Schneider.Sh EXAMPLE
483bf29452fSWolfram Schneider.Pp
4845f436cfbSKazutaka YOKOTA.Dl moused -p /dev/cuaa0 -i type
4855f436cfbSKazutaka YOKOTA.Pp
4865f436cfbSKazutaka YOKOTALet the
4875f436cfbSKazutaka YOKOTA.Nm
4885f436cfbSKazutaka YOKOTAcommand determine the protocol type of the mouse at the serial port
4895f436cfbSKazutaka YOKOTA.Pa /dev/cuaa0 .
4905f436cfbSKazutaka YOKOTAIf successful, the command will print the type, otherwise it will say
4915f436cfbSKazutaka YOKOTA``unknown''.
4925f436cfbSKazutaka YOKOTA.Pp
4935f436cfbSKazutaka YOKOTA.Dl moused -p /dev/cuaa0
494bf29452fSWolfram Schneider.Dl vidcontrol -m on
495bf29452fSWolfram Schneider.Pp
4965f436cfbSKazutaka YOKOTAIf the
4975f436cfbSKazutaka YOKOTA.Nm
4985f436cfbSKazutaka YOKOTAcommand is able to identify the protocol type of the mouse at the specified
4995f436cfbSKazutaka YOKOTAport automatically, you can start the daemon without the
5005f436cfbSKazutaka YOKOTA.Fl t
5015f436cfbSKazutaka YOKOTAoption and enable the mouse pointer in the text console as above.
5025f436cfbSKazutaka YOKOTA.Pp
5035f436cfbSKazutaka YOKOTA.Dl moused -p /dev/mouse -t microsoft
5045f436cfbSKazutaka YOKOTA.Dl vidcontrol -m on
5055f436cfbSKazutaka YOKOTA.Pp
5065f436cfbSKazutaka YOKOTAStart the mouse daemon on the serial port
5075f436cfbSKazutaka YOKOTA.Pa /dev/mouse .
5085f436cfbSKazutaka YOKOTAThe protocol type
5095f436cfbSKazutaka YOKOTA.Ar microsoft
5105f436cfbSKazutaka YOKOTAis explicitly specified by the
5115f436cfbSKazutaka YOKOTA.Fl t
5125f436cfbSKazutaka YOKOTAoption.
5135f436cfbSKazutaka YOKOTA.Pp
5145f436cfbSKazutaka YOKOTA.Dl moused -p /dev/mouse -m 1=3 -m 3=1
5155f436cfbSKazutaka YOKOTA.Pp
5165f436cfbSKazutaka YOKOTAAssign the physical button 3 (right button) to the logical button 1
5175f436cfbSKazutaka YOKOTA(logical left) and the physical button 1 (left) to the logical
5185f436cfbSKazutaka YOKOTAbutton 3 (logical right).
5195f436cfbSKazutaka YOKOTAThis will effectively swap the left and right buttons.
5205f436cfbSKazutaka YOKOTA.Pp
5215f436cfbSKazutaka YOKOTA.Dl moused -p /dev/mouse -t intellimouse -z 4
5225f436cfbSKazutaka YOKOTA.Pp
5235f436cfbSKazutaka YOKOTAReport negative Z axis (roller) movement as the button 4 pressed
5245f436cfbSKazutaka YOKOTAand positive Z axis movement as the button 5 pressed.
5255f436cfbSKazutaka YOKOTA.Sh CAVEATS
5265f436cfbSKazutaka YOKOTAThe
5275f436cfbSKazutaka YOKOTA.Nm
5285f436cfbSKazutaka YOKOTAcommand does not currently work with the alternative console driver
5295f436cfbSKazutaka YOKOTA.Xr pcvt 4 .
5305f436cfbSKazutaka YOKOTA.Pp
5315f436cfbSKazutaka YOKOTAMany pad devices behave as if the first (left) button were pressed if
5325f436cfbSKazutaka YOKOTAthe user `taps' the surface of the pad.
5332e09fb67SKazutaka YOKOTAIn contrast, some ALPS GlidePoint and Interlink VersaPad models
5342e09fb67SKazutaka YOKOTAtreat the tapping action
5355f436cfbSKazutaka YOKOTAas fourth button events. Use the option ``-m 1=4'' for these models
5365f436cfbSKazutaka YOKOTAto obtain the same effect as the other pad devices.
537851c9886SKazutaka YOKOTA.Pp
538851c9886SKazutaka YOKOTACut and paste functions in the virtual console assume that there
539851c9886SKazutaka YOKOTAare three buttons on the mouse.
540851c9886SKazutaka YOKOTAThe logical button 1 (logical left) selects a region of text in the
541851c9886SKazutaka YOKOTAconsole and copies it to the cut buffer.
542851c9886SKazutaka YOKOTAThe logical button 3 (logical right) extends the selected region.
543851c9886SKazutaka YOKOTAThe logical button 2 (logical middle) pastes the selected text
544851c9886SKazutaka YOKOTAat the text cursor position.
545851c9886SKazutaka YOKOTAIf the mouse has only two buttons, the middle, `paste' button
546851c9886SKazutaka YOKOTAis not available.
547851c9886SKazutaka YOKOTATo obtain the paste function, use the
548851c9886SKazutaka YOKOTA.Fl 3
549851c9886SKazutaka YOKOTAoption to emulate the middle button, or use the
550851c9886SKazutaka YOKOTA.Fl m
551851c9886SKazutaka YOKOTAoption to assign the physical right button to the logical middle button:
552851c9886SKazutaka YOKOTA``-m 2=3''.
55394a804c5SMike Pritchard.Sh SEE ALSO
5545f436cfbSKazutaka YOKOTA.Xr kill 1 ,
5555cf470d6SWolfram Schneider.Xr vidcontrol 1 ,
55694a804c5SMike Pritchard.Xr keyboard 4 ,
5575f436cfbSKazutaka YOKOTA.Xr mse 4 ,
55894a804c5SMike Pritchard.Xr pcvt 4 ,
5595f436cfbSKazutaka YOKOTA.Xr psm 4 ,
560b7d50183SWolfram Schneider.Xr screen 4 ,
561b7d50183SWolfram Schneider.Xr sysmouse 4
5625f436cfbSKazutaka YOKOTA.Sh STANDARD
5635f436cfbSKazutaka YOKOTAThe
5645f436cfbSKazutaka YOKOTA.Nm
5655f436cfbSKazutaka YOKOTAcommand partially supports ``Plag and Play External COM Device Specification''
5665f436cfbSKazutaka YOKOTAin order to support PnP serial mice.
5675f436cfbSKazutaka YOKOTAHowever, due to various degrees of conformance to the specification by
5685f436cfbSKazutaka YOKOTAexisting serial mice, it does not strictly follow the version 1.0 of the
5695f436cfbSKazutaka YOKOTAstandard. Even with this less strict approach,
5705f436cfbSKazutaka YOKOTAit may not always determine an appropriate protocol type
5715f436cfbSKazutaka YOKOTAfor the given serial mouse.
57294a804c5SMike Pritchard.Sh AUTHORS
57394a804c5SMike PritchardThe
57494a804c5SMike Pritchard.Nm
57507e1d533SPhilippe Charniercommand was written by
5762dcf9f10SSteve Price.An Michael Smith Aq msmith@FreeBSD.org .
5775f436cfbSKazutaka YOKOTAThis manual page was written by
57807e1d533SPhilippe Charnier.An Mike Pritchard Aq mpp@FreeBSD.org .
5792dcf9f10SSteve PriceThe command and manual page have since been updated by
5802dcf9f10SSteve Price.An Kazutaka Yokota Aq yokota@FreeBSD.org .
58194a804c5SMike Pritchard.Sh HISTORY
58294a804c5SMike PritchardThe
58307e1d533SPhilippe Charnier.Nm
58494a804c5SMike Pritchardcommand first appeared in
58594a804c5SMike Pritchard.Fx 2.2 .
586