xref: /freebsd/usr.sbin/moused/moused.8 (revision 224f83d2f8366544771c7e4e55bb610be2429cc2)
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.\"
3197d92980SPeter Wemm.\" $FreeBSD$
325cf470d6SWolfram Schneider.\"
333e95467cSPhilip Paeps.Dd May 15, 2008
3494a804c5SMike Pritchard.Dt MOUSED 8
35a4c37c81SRuslan Ermilov.Os
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
41efe4cd6aSGeorge C A Reid.Op Fl DPRacdfs
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
463e95467cSPhilip Paeps.Op Fl VH Op Fl U Ar distance Fl L Ar distance
4786b3ea36SPhilip Paeps.Op Fl A Ar exp Ns Op , Ns Ar offset
48efe4cd6aSGeorge C A Reid.Op Fl a Ar X Ns Op , Ns Ar Y
495f436cfbSKazutaka YOKOTA.Op Fl C Ar threshold
505f436cfbSKazutaka YOKOTA.Op Fl m Ar N=M
519fb1d70cSKazutaka YOKOTA.Op Fl w Ar N
525f436cfbSKazutaka YOKOTA.Op Fl z Ar target
535f436cfbSKazutaka YOKOTA.Op Fl t Ar mousetype
5433282bf4SPhilip Paeps.Op Fl l Ar level
55e68b10b3SKazutaka YOKOTA.Op Fl 3 Op Fl E Ar timeout
56d5f2946aSPhilip Paeps.Op Fl T Ar distance Ns Op , Ns Ar time Ns Op , Ns Ar after
5794a804c5SMike Pritchard.Fl p Ar port
5894a804c5SMike Pritchard.Pp
595f436cfbSKazutaka YOKOTA.Nm
605f436cfbSKazutaka YOKOTA.Op Fl Pd
615f436cfbSKazutaka YOKOTA.Fl p Ar port
625f436cfbSKazutaka YOKOTA.Fl i Ar info
635f436cfbSKazutaka YOKOTA.Sh DESCRIPTION
64490d5836SPhilippe CharnierThe
655f436cfbSKazutaka YOKOTA.Nm
66490d5836SPhilippe Charnierutility and the console driver work together to support
675f436cfbSKazutaka YOKOTAmouse operation in the text console and user programs.
685f436cfbSKazutaka YOKOTAThey virtualize the mouse and provide user programs with mouse data
695f436cfbSKazutaka YOKOTAin the standard format
70c4d9468eSRuslan Ermilov(see
71c4d9468eSRuslan Ermilov.Xr sysmouse 4 ) .
725f436cfbSKazutaka YOKOTA.Pp
735f436cfbSKazutaka YOKOTAThe mouse daemon listens to the specified port for mouse data,
745f436cfbSKazutaka YOKOTAinterprets and then passes it via ioctls to the console driver.
755f436cfbSKazutaka YOKOTAThe mouse daemon
765f436cfbSKazutaka YOKOTAreports translation movement, button press/release
775f436cfbSKazutaka YOKOTAevents and movement of the roller or the wheel if available.
7859bd9500SSimon L. B. NielsenThe roller/wheel movement is reported as
7959bd9500SSimon L. B. Nielsen.Dq Z
8059bd9500SSimon L. B. Nielsenaxis movement.
815f436cfbSKazutaka YOKOTA.Pp
825f436cfbSKazutaka YOKOTAThe console driver will display the mouse pointer on the screen
835f436cfbSKazutaka YOKOTAand provide cut and paste functions if the mouse pointer is enabled
845f436cfbSKazutaka YOKOTAin the virtual console via
852f2ac2cbSChris Costello.Xr vidcontrol 1 .
865f436cfbSKazutaka YOKOTAIf
875f436cfbSKazutaka YOKOTA.Xr sysmouse 4
885f436cfbSKazutaka YOKOTAis opened by the user program, the console driver also passes the mouse
895f436cfbSKazutaka YOKOTAdata to the device so that the user program will see it.
905f436cfbSKazutaka YOKOTA.Pp
915f436cfbSKazutaka YOKOTAIf the mouse daemon receives the signal
925f436cfbSKazutaka YOKOTA.Dv SIGHUP ,
93bc84aa4bSRuslan Ermilovit will reopen the mouse port and reinitialize itself.
94bc84aa4bSRuslan ErmilovUseful if
955f436cfbSKazutaka YOKOTAthe mouse is attached/detached while the system is suspended.
965f436cfbSKazutaka YOKOTA.Pp
979eac5bb9SPhilip PaepsIf the mouse daemon receives the signal
989eac5bb9SPhilip Paeps.Dv SIGUSR1 ,
99bc84aa4bSRuslan Ermilovit will stop passing mouse events.
100bc84aa4bSRuslan ErmilovSending the signal
1019eac5bb9SPhilip Paeps.Dv SIGUSR1
102bc84aa4bSRuslan Ermilovagain will resume passing mouse events.
103bc84aa4bSRuslan ErmilovUseful if your typing on a laptop is
1049eac5bb9SPhilip Paepsinterrupted by accidentally touching the mouse pad.
1059eac5bb9SPhilip Paeps.Pp
1065f436cfbSKazutaka YOKOTAThe following options are available:
10794a804c5SMike Pritchard.Bl -tag -width indent
1085f436cfbSKazutaka YOKOTA.It Fl 3
109f2e366a1SSheldon HearnEmulate the third (middle) button for 2-button mice.
110f2e366a1SSheldon HearnIt is emulated
1115f436cfbSKazutaka YOKOTAby pressing the left and right physical buttons simultaneously.
1125f436cfbSKazutaka YOKOTA.It Fl C Ar threshold
1135f436cfbSKazutaka YOKOTASet double click speed as the maximum interval in msec between button clicks.
1145f436cfbSKazutaka YOKOTAWithout this option, the default value of 500 msec will be assumed.
1155f436cfbSKazutaka YOKOTAThis option will have effect only on the cut and paste operations
116f2e366a1SSheldon Hearnin the text mode console.
117f2e366a1SSheldon HearnThe user program which is reading mouse data
1185f436cfbSKazutaka YOKOTAvia
1195f436cfbSKazutaka YOKOTA.Xr sysmouse 4
120f5c73cbbSKazutaka YOKOTAwill not be affected.
12194a804c5SMike Pritchard.It Fl D
12294a804c5SMike PritchardLower DTR on the serial port.
1235f436cfbSKazutaka YOKOTAThis option is valid only if
1245f436cfbSKazutaka YOKOTA.Ar mousesystems
1255f436cfbSKazutaka YOKOTAis selected as the protocol type.
1265f436cfbSKazutaka YOKOTAThe DTR line may need to be dropped for a 3-button mouse
1275f436cfbSKazutaka YOKOTAto operate in the
1285f436cfbSKazutaka YOKOTA.Ar mousesystems
1295f436cfbSKazutaka YOKOTAmode.
130e68b10b3SKazutaka YOKOTA.It Fl E Ar timeout
131e68b10b3SKazutaka YOKOTAWhen the third button emulation is enabled
132c4d9468eSRuslan Ermilov(see above),
133e68b10b3SKazutaka YOKOTAthe
134e68b10b3SKazutaka YOKOTA.Nm
135490d5836SPhilippe Charnierutility waits
136e68b10b3SKazutaka YOKOTA.Ar timeout
137f5c73cbbSKazutaka YOKOTAmsec at most before deciding whether two buttons are being pressed
138e68b10b3SKazutaka YOKOTAsimultaneously.
1399c9d9993SKazutaka YOKOTAThe default timeout is 100 msec.
1405f436cfbSKazutaka YOKOTA.It Fl F Ar rate
1415f436cfbSKazutaka YOKOTASet the report rate (reports/sec) of the device if supported.
1423e95467cSPhilip Paeps.It Fl L Ar distance
1433e95467cSPhilip PaepsWhen
1443e95467cSPhilip Paeps.Dq Virtual Scrolling
1453e95467cSPhilip Paepsis enabled, the
1463e95467cSPhilip Paeps.Fl L
1473e95467cSPhilip Paepsoption can be used to set the
1483e95467cSPhilip Paeps.Ar distance
1493e95467cSPhilip Paeps(in pixels) that the mouse must move before a scroll event
1503e95467cSPhilip Paepsis generated.  This effectively controls the scrolling speed.
1513e95467cSPhilip PaepsThe default
1523e95467cSPhilip Paeps.Ar distance
1533e95467cSPhilip Paepsis 2 pixels.
1542c9b9132SPhilip Paeps.It Fl H
1552c9b9132SPhilip PaepsEnable
1562c9b9132SPhilip Paeps.Dq Horizontal Virtual Scrolling .
1572c9b9132SPhilip PaepsWith this option set, holding the middle mouse
1582c9b9132SPhilip Paepsbutton down will cause motion to be interpreted as
1592c9b9132SPhilip Paepshorizontal scrolling.
1602c9b9132SPhilip PaepsUse the
1612c9b9132SPhilip Paeps.Fl U
1622c9b9132SPhilip Paepsoption to set the distance the mouse must move before the scrolling mode is
1633e95467cSPhilip Paepsactivated and the
1643e95467cSPhilip Paeps.Fl L
1653e95467cSPhilip Paepsoption to set the scrolling speed.
16678ad5421SRuslan ErmilovThis option may be used with or without the
1672c9b9132SPhilip Paeps.Fl V
1682c9b9132SPhilip Paepsoption.
169f82812a2SKazutaka YOKOTA.It Fl I Ar file
170f82812a2SKazutaka YOKOTAWrite the process id of the
171f82812a2SKazutaka YOKOTA.Nm
172490d5836SPhilippe Charnierutility in the specified file.
173f82812a2SKazutaka YOKOTAWithout this option, the process id will be stored in
174f82812a2SKazutaka YOKOTA.Pa /var/run/moused.pid .
1755f436cfbSKazutaka YOKOTA.It Fl P
1765f436cfbSKazutaka YOKOTADo not start the Plug and Play COM device enumeration procedure
1775f436cfbSKazutaka YOKOTAwhen identifying the serial mouse.
1785f436cfbSKazutaka YOKOTAIf this option is given together with the
1795f436cfbSKazutaka YOKOTA.Fl i
1805f436cfbSKazutaka YOKOTAoption, the
1815f436cfbSKazutaka YOKOTA.Nm
182490d5836SPhilippe Charnierutility will not be able to print useful information for the serial mouse.
18394a804c5SMike Pritchard.It Fl R
18494a804c5SMike PritchardLower RTS on the serial port.
1855f436cfbSKazutaka YOKOTAThis option is valid only if
1865f436cfbSKazutaka YOKOTA.Ar mousesystems
1875f436cfbSKazutaka YOKOTAis selected as the protocol type by the
1885f436cfbSKazutaka YOKOTA.Fl t
189f2e366a1SSheldon Hearnoption below.
190f2e366a1SSheldon HearnIt is often used with the
1915f436cfbSKazutaka YOKOTA.Fl D
192f2e366a1SSheldon Hearnoption above.
193f2e366a1SSheldon HearnBoth RTS and DTR lines may need to be dropped for
1945f436cfbSKazutaka YOKOTAa 3-button mouse to operate in the
1955f436cfbSKazutaka YOKOTA.Ar mousesystems
1965f436cfbSKazutaka YOKOTAmode.
19794a804c5SMike Pritchard.It Fl S Ar baudrate
19894a804c5SMike PritchardSelect the baudrate for the serial port (1200 to 9600).
1995f436cfbSKazutaka YOKOTANot all serial mice support this option.
200d5f2946aSPhilip Paeps.It Fl T Ar distance Ns Op , Ns Ar time Ns Op , Ns Ar after
2018f3d766bSPhilip PaepsTerminate drift.
202d5f2946aSPhilip PaepsUse this option if mouse pointer slowly wanders when mouse is not moved.
203d5f2946aSPhilip PaepsMovements up to
204d5f2946aSPhilip Paeps.Ar distance
205d5f2946aSPhilip Paeps(for example 4) pixels (X+Y) in
206d5f2946aSPhilip Paeps.Ar time
207d5f2946aSPhilip Paepsmsec (default 500) are ignored, except during
208d5f2946aSPhilip Paeps.Ar after
209d5f2946aSPhilip Paepsmsec (default 4000) since last real mouse movement.
2102a669c47SPhilip Paeps.It Fl V
21159bd9500SSimon L. B. NielsenEnable
21259bd9500SSimon L. B. Nielsen.Dq Virtual Scrolling .
21359bd9500SSimon L. B. NielsenWith this option set, holding the middle mouse
21459bd9500SSimon L. B. Nielsenbutton down will cause motion to be interpreted as scrolling.
21559bd9500SSimon L. B. NielsenUse the
2162a669c47SPhilip Paeps.Fl U
2172a669c47SPhilip Paepsoption to set the distance the mouse must move before the scrolling mode is
2183e95467cSPhilip Paepsactivated and the
2193e95467cSPhilip Paeps.Fl L
2203e95467cSPhilip Paepsoption to set the scrolling speed.
221ba133278SPhilip Paeps.It Fl U Ar distance
222ba133278SPhilip PaepsWhen
223ba133278SPhilip Paeps.Dq Virtual Scrolling
224ba133278SPhilip Paepsis enabled, the
225ba133278SPhilip Paeps.Fl U
226ba133278SPhilip Paepsoption can be used to set the
227ba133278SPhilip Paeps.Ar distance
228ba133278SPhilip Paeps(in pixels) that the mouse must move before the scrolling
229ba133278SPhilip Paepsmode is activated.
230ba133278SPhilip PaepsThe default
231ba133278SPhilip Paeps.Ar distance
232ba133278SPhilip Paepsis 3 pixels.
23386b3ea36SPhilip Paeps.It Fl A Ar exp Ns Op , Ns Ar offset
23486b3ea36SPhilip PaepsApply exponential (dynamic) acceleration to mouse movements:
23586b3ea36SPhilip Paepsthe faster you move the mouse, the more it will be accelerated.
23686b3ea36SPhilip PaepsThat means that small mouse movements are not accelerated,
23786b3ea36SPhilip Paepsso they are still very accurate, while a faster movement will
23886b3ea36SPhilip Paepsdrive the pointer quickly across the screen.
23986b3ea36SPhilip Paeps.Pp
24086b3ea36SPhilip PaepsThe
24186b3ea36SPhilip Paeps.Ar exp
24286b3ea36SPhilip Paepsvalue specifies the exponent, which is basically
24386b3ea36SPhilip Paepsthe amount of acceleration.  Useful values are in the
24486b3ea36SPhilip Paepsrange 1.1 to 2.0, but it depends on your mouse hardware
24586b3ea36SPhilip Paepsand your personal preference.  A value of 1.0 means no
24686b3ea36SPhilip Paepsexponential acceleration.  A value of 2.0 means squared
24786b3ea36SPhilip Paepsacceleration (i.e. if you move the mouse twice as fast,
24886b3ea36SPhilip Paepsthe pointer will move four times as fast on the screen).
24986b3ea36SPhilip PaepsValues beyond 2.0 are possible but not recommended.
25086b3ea36SPhilip PaepsA good value to start is probably 1.5.
25186b3ea36SPhilip Paeps.Pp
25286b3ea36SPhilip PaepsThe optional
25386b3ea36SPhilip Paeps.Ar offset
25486b3ea36SPhilip Paepsvalue specifies the distance at which the acceleration
25586b3ea36SPhilip Paepsbegins.  The default is 1.0, which means that the
25686b3ea36SPhilip Paepsacceleration is applied to movements larger than one unit.
25786b3ea36SPhilip PaepsIf you specify a larger value, it takes more speed for
25886b3ea36SPhilip Paepsthe acceleration to kick in, i.e. the speed range for
25986b3ea36SPhilip Paepssmall and accurate movements is wider.
26086b3ea36SPhilip PaepsUsually the default should be sufficient, but if you're
26186b3ea36SPhilip Paepsnot satisfied with the behaviour, try a value of 2.0.
26286b3ea36SPhilip Paeps.Pp
26386b3ea36SPhilip PaepsNote that the
26486b3ea36SPhilip Paeps.Fl A
26586b3ea36SPhilip Paepsoption interacts badly with the X server's own acceleration,
26686b3ea36SPhilip Paepswhich doesn't work very well anyway.  Therefore it is
26786b3ea36SPhilip Paepsrecommended to switch it off if necessary:
26886b3ea36SPhilip Paeps.Dq xset m 1 .
269efe4cd6aSGeorge C A Reid.It Fl a Ar X Ns Op , Ns Ar Y
270efe4cd6aSGeorge C A ReidAccelerate or decelerate the mouse input.
271efe4cd6aSGeorge C A ReidThis is a linear acceleration only.
272efe4cd6aSGeorge C A ReidValues less than 1.0 slow down movement, values greater than 1.0 speed it
273efe4cd6aSGeorge C A Reidup.
274efe4cd6aSGeorge C A ReidSpecifying only one value sets the acceleration for both axes.
27586b3ea36SPhilip Paeps.Pp
27686b3ea36SPhilip PaepsYou can use the
27786b3ea36SPhilip Paeps.Fl a
27886b3ea36SPhilip Paepsand
27986b3ea36SPhilip Paeps.Fl A
28086b3ea36SPhilip Paepsoptions at the same time to have the combined effect
28186b3ea36SPhilip Paepsof linear and exponential acceleration.
28294a804c5SMike Pritchard.It Fl c
2835f436cfbSKazutaka YOKOTASome mice report middle button down events
284f5c73cbbSKazutaka YOKOTAas if the left and right buttons are being pressed.
285f2e366a1SSheldon HearnThis option handles this.
28694a804c5SMike Pritchard.It Fl d
28794a804c5SMike PritchardEnable debugging messages.
28894a804c5SMike Pritchard.It Fl f
28994a804c5SMike PritchardDo not become a daemon and instead run as a foreground process.
2905f436cfbSKazutaka YOKOTAUseful for testing and debugging.
2915f436cfbSKazutaka YOKOTA.It Fl i Ar info
29207bfccd7SRuslan ErmilovPrint specified information and quit.
29307bfccd7SRuslan ErmilovAvailable pieces of
2945f436cfbSKazutaka YOKOTAinformation are:
2955f436cfbSKazutaka YOKOTA.Pp
2965f436cfbSKazutaka YOKOTA.Bl -tag -compact -width modelxxx
2975f436cfbSKazutaka YOKOTA.It Ar port
29857e4378bSRuslan ErmilovPort (device file) name, i.e.\&
299d0139887SPhilip Paeps.Pa /dev/cuad0 ,
3005f436cfbSKazutaka YOKOTA.Pa /dev/mse0
3015f436cfbSKazutaka YOKOTAand
3025f436cfbSKazutaka YOKOTA.Pa /dev/psm0 .
3035f436cfbSKazutaka YOKOTA.It Ar if
3045f436cfbSKazutaka YOKOTAInterface type: serial, bus, inport or ps/2.
3055f436cfbSKazutaka YOKOTA.It Ar type
306f2e366a1SSheldon HearnProtocol type.
307f2e366a1SSheldon HearnIt is one of the types listed under the
3085f436cfbSKazutaka YOKOTA.Fl t
3095f436cfbSKazutaka YOKOTAoption below or
3105f436cfbSKazutaka YOKOTA.Ar sysmouse
3115f436cfbSKazutaka YOKOTAif the driver supports the
3125f436cfbSKazutaka YOKOTA.Ar sysmouse
3135f436cfbSKazutaka YOKOTAdata format standard.
3145f436cfbSKazutaka YOKOTA.It Ar model
31507bfccd7SRuslan ErmilovMouse model.
31607bfccd7SRuslan ErmilovThe
3175f436cfbSKazutaka YOKOTA.Nm
318490d5836SPhilippe Charnierutility may not always be able to identify the model.
3195f436cfbSKazutaka YOKOTA.It Ar all
32007bfccd7SRuslan ErmilovAll of the above items.
32107bfccd7SRuslan ErmilovPrint port, interface, type and model in this order
3225f436cfbSKazutaka YOKOTAin one line.
3235f436cfbSKazutaka YOKOTA.El
3245f436cfbSKazutaka YOKOTA.Pp
3255f436cfbSKazutaka YOKOTAIf the
3265f436cfbSKazutaka YOKOTA.Nm
32759bd9500SSimon L. B. Nielsenutility cannot determine the requested information, it prints
32859bd9500SSimon L. B. Nielsen.Dq Li unknown
32959bd9500SSimon L. B. Nielsenor
33059bd9500SSimon L. B. Nielsen.Dq Li generic .
33133282bf4SPhilip Paeps.It Fl l Ar level
33233282bf4SPhilip PaepsSpecifies at which level
33333282bf4SPhilip Paeps.Nm
33433282bf4SPhilip Paepsshould operate the mouse driver.
33533282bf4SPhilip PaepsRefer to
3361a74e6a1SRuslan Ermilov.Sx Operation Levels
33733282bf4SPhilip Paepsin
33833282bf4SPhilip Paeps.Xr psm 4
33933282bf4SPhilip Paepsfor more information on this.
3405f436cfbSKazutaka YOKOTA.It Fl m Ar N=M
3415f436cfbSKazutaka YOKOTAAssign the physical button
3425f436cfbSKazutaka YOKOTA.Ar M
3435f436cfbSKazutaka YOKOTAto the logical button
3445f436cfbSKazutaka YOKOTA.Ar N .
3455f436cfbSKazutaka YOKOTAYou may specify as many instances of this option as you like.
3465f436cfbSKazutaka YOKOTAMore than one physical button may be assigned to a logical button at the
347f2e366a1SSheldon Hearnsame time.
348f2e366a1SSheldon HearnIn this case the logical button will be down,
3495f436cfbSKazutaka YOKOTAif either of the assigned physical buttons is held down.
35059bd9500SSimon L. B. NielsenDo not put space around
35159bd9500SSimon L. B. Nielsen.Ql = .
35294a804c5SMike Pritchard.It Fl p Ar port
35394a804c5SMike PritchardUse
35494a804c5SMike Pritchard.Ar port
3555f436cfbSKazutaka YOKOTAto communicate with the mouse.
3565f436cfbSKazutaka YOKOTA.It Fl r Ar resolution
3575f436cfbSKazutaka YOKOTASet the resolution of the device; in Dots Per Inch, or
3585f436cfbSKazutaka YOKOTA.Ar low ,
3595f436cfbSKazutaka YOKOTA.Ar medium-low ,
3605f436cfbSKazutaka YOKOTA.Ar medium-high
3615f436cfbSKazutaka YOKOTAor
3625f436cfbSKazutaka YOKOTA.Ar high .
3635f436cfbSKazutaka YOKOTAThis option may not be supported by all the device.
36494a804c5SMike Pritchard.It Fl s
36594a804c5SMike PritchardSelect a baudrate of 9600 for the serial line.
3665f436cfbSKazutaka YOKOTANot all serial mice support this option.
3675f436cfbSKazutaka YOKOTA.It Fl t Ar type
368f8b013e2SKazutaka YOKOTASpecify the protocol type of the mouse attached to the port.
36930ee7535SKazutaka YOKOTAYou may explicitly specify a type listed below, or use
37030ee7535SKazutaka YOKOTA.Ar auto
37130ee7535SKazutaka YOKOTAto let the
372f8b013e2SKazutaka YOKOTA.Nm
37375c07b90SChristian Bruefferutility automatically select an appropriate protocol for the given
37430ee7535SKazutaka YOKOTAmouse.
37575c07b90SChristian BruefferIf you entirely omit this option in the command line,
37630ee7535SKazutaka YOKOTA.Fl t Ar auto
37730ee7535SKazutaka YOKOTAis assumed.
37830ee7535SKazutaka YOKOTAUnder normal circumstances,
37930ee7535SKazutaka YOKOTAyou need to use this option only if the
38030ee7535SKazutaka YOKOTA.Nm
381490d5836SPhilippe Charnierutility is not able to detect the protocol automatically
38275c07b90SChristian Brueffer(see
383c4d9468eSRuslan Ermilov.Sx "Configuring Mouse Daemon" ) .
384f8b013e2SKazutaka YOKOTA.Pp
3859e65e45bSKazutaka YOKOTANote that if a protocol type is specified with this option, the
38630ee7535SKazutaka YOKOTA.Fl P
38730ee7535SKazutaka YOKOTAoption above is implied and Plug and Play COM device enumeration
38830ee7535SKazutaka YOKOTAprocedure will be disabled.
38930ee7535SKazutaka YOKOTA.Pp
3909e65e45bSKazutaka YOKOTAAlso note that if your mouse is attached to the PS/2 mouse port, you should
3919e65e45bSKazutaka YOKOTAalways choose
3929e65e45bSKazutaka YOKOTA.Ar auto
3939e65e45bSKazutaka YOKOTAor
3949e65e45bSKazutaka YOKOTA.Ar ps/2 ,
39507bfccd7SRuslan Ermilovregardless of the brand and model of the mouse.
39607bfccd7SRuslan ErmilovLikewise, if your
3979e65e45bSKazutaka YOKOTAmouse is attached to the bus mouse port, choose
3989e65e45bSKazutaka YOKOTA.Ar auto
3999e65e45bSKazutaka YOKOTAor
4009e65e45bSKazutaka YOKOTA.Ar busmouse .
4019e65e45bSKazutaka YOKOTASerial mouse protocols will not work with these mice.
4029e65e45bSKazutaka YOKOTA.Pp
403045c8108SKazutaka YOKOTAFor the USB mouse, the protocol must be
404045c8108SKazutaka YOKOTA.Ar auto .
405045c8108SKazutaka YOKOTANo other protocol will work with the USB mouse.
406045c8108SKazutaka YOKOTA.Pp
407f8b013e2SKazutaka YOKOTAValid types for this option are
4085f436cfbSKazutaka YOKOTAlisted below.
40994a804c5SMike Pritchard.Pp
4105f436cfbSKazutaka YOKOTAFor the serial mouse:
41194a804c5SMike Pritchard.Bl -tag -compact -width mousesystemsxxx
4125f436cfbSKazutaka YOKOTA.It Ar microsoft
41307bfccd7SRuslan ErmilovMicrosoft serial mouse protocol.
41407bfccd7SRuslan ErmilovMost 2-button serial mice use this protocol.
4155f436cfbSKazutaka YOKOTA.It Ar intellimouse
41607bfccd7SRuslan ErmilovMicrosoft IntelliMouse protocol.
41707bfccd7SRuslan ErmilovGenius NetMouse,
418490d5836SPhilippe Charnier.Tn ASCII
419490d5836SPhilippe CharnierMie Mouse,
4205f436cfbSKazutaka YOKOTALogitech MouseMan+ and FirstMouse+ use this protocol too.
4215f436cfbSKazutaka YOKOTAOther mice with a roller/wheel may be compatible with this protocol.
4225f436cfbSKazutaka YOKOTA.It Ar mousesystems
42307bfccd7SRuslan ErmilovMouseSystems 5-byte protocol.
42407bfccd7SRuslan Ermilov3-button mice may use this protocol.
4255f436cfbSKazutaka YOKOTA.It Ar mmseries
4265f436cfbSKazutaka YOKOTAMM Series mouse protocol.
4275f436cfbSKazutaka YOKOTA.It Ar logitech
42807bfccd7SRuslan ErmilovLogitech mouse protocol.
42907bfccd7SRuslan ErmilovNote that this is for old Logitech models.
4305f436cfbSKazutaka YOKOTA.Ar mouseman
4315f436cfbSKazutaka YOKOTAor
4325f436cfbSKazutaka YOKOTA.Ar intellimouse
4335f436cfbSKazutaka YOKOTAshould be specified for newer models.
4345f436cfbSKazutaka YOKOTA.It Ar mouseman
43507bfccd7SRuslan ErmilovLogitech MouseMan and TrackMan protocol.
43607bfccd7SRuslan ErmilovSome 3-button mice may be compatible
43707bfccd7SRuslan Ermilovwith this protocol.
43807bfccd7SRuslan ErmilovNote that MouseMan+ and FirstMouse+ use
4395f436cfbSKazutaka YOKOTA.Ar intellimouse
4405f436cfbSKazutaka YOKOTAprotocol rather than this one.
4415f436cfbSKazutaka YOKOTA.It Ar glidepoint
4425f436cfbSKazutaka YOKOTAALPS GlidePoint protocol.
4435f436cfbSKazutaka YOKOTA.It Ar thinkingmouse
4445f436cfbSKazutaka YOKOTAKensington ThinkingMouse protocol.
445929cbbf2SDoug White.It Ar mmhitab
4465f436cfbSKazutaka YOKOTAHitachi tablet protocol.
44767978692SAmancio Hasty.It Ar x10mouseremote
44867978692SAmancio HastyX10 MouseRemote.
4491b11ca6cSKazutaka YOKOTA.It Ar kidspad
4501b11ca6cSKazutaka YOKOTAGenius Kidspad and Easypad protocol.
4512e09fb67SKazutaka YOKOTA.It Ar versapad
4522e09fb67SKazutaka YOKOTAInterlink VersaPad protocol.
453ce99e877SMatthew N. Dodd.It Ar gtco_digipad
454ce99e877SMatthew N. DoddGTCO Digipad protocol.
455*224f83d2SGlen Barber.El
4565f436cfbSKazutaka YOKOTA.Pp
4575f436cfbSKazutaka YOKOTAFor the bus and InPort mouse:
4585f436cfbSKazutaka YOKOTA.Bl -tag -compact -width mousesystemsxxx
4595f436cfbSKazutaka YOKOTA.It Ar busmouse
4605f436cfbSKazutaka YOKOTAThis is the only protocol type available for
4615f436cfbSKazutaka YOKOTAthe bus and InPort mouse and should be specified for any bus mice
4625f436cfbSKazutaka YOKOTAand InPort mice, regardless of the brand.
4635f436cfbSKazutaka YOKOTA.El
4645f436cfbSKazutaka YOKOTA.Pp
4655f436cfbSKazutaka YOKOTAFor the PS/2 mouse:
4665f436cfbSKazutaka YOKOTA.Bl -tag -compact -width mousesystemsxxx
4675f436cfbSKazutaka YOKOTA.It Ar ps/2
4685f436cfbSKazutaka YOKOTAThis is the only protocol type available for the PS/2 mouse
4695f436cfbSKazutaka YOKOTAand should be specified for any PS/2 mice, regardless of the brand.
4705f436cfbSKazutaka YOKOTA.El
471045c8108SKazutaka YOKOTA.Pp
472045c8108SKazutaka YOKOTAFor the USB mouse,
473045c8108SKazutaka YOKOTA.Ar auto
474045c8108SKazutaka YOKOTAis the only protocol type available for the USB mouse
475045c8108SKazutaka YOKOTAand should be specified for any USB mice, regardless of the brand.
4769fb1d70cSKazutaka YOKOTA.It Fl w Ar N
4779fb1d70cSKazutaka YOKOTAMake the physical button
4789fb1d70cSKazutaka YOKOTA.Ar N
4799fb1d70cSKazutaka YOKOTAact as the wheel mode button.
4809fb1d70cSKazutaka YOKOTAWhile this button is pressed, X and Y axis movement is reported to be zero
4819fb1d70cSKazutaka YOKOTAand the Y axis movement is mapped to Z axis.
4829fb1d70cSKazutaka YOKOTAYou may further map the Z axis movement to virtual buttons by the
4839fb1d70cSKazutaka YOKOTA.Fl z
4849fb1d70cSKazutaka YOKOTAoption below.
4855f436cfbSKazutaka YOKOTA.It Fl z Ar target
4865f436cfbSKazutaka YOKOTAMap Z axis (roller/wheel) movement to another axis or to virtual buttons.
4875f436cfbSKazutaka YOKOTAValid
4885f436cfbSKazutaka YOKOTA.Ar target
4895f436cfbSKazutaka YOKOTAmaybe:
4905f436cfbSKazutaka YOKOTA.Bl -tag -compact -width x__
4915f436cfbSKazutaka YOKOTA.It Ar x
4925f436cfbSKazutaka YOKOTA.It Ar y
4935f436cfbSKazutaka YOKOTAX or Y axis movement will be reported when the Z axis movement is detected.
4945f436cfbSKazutaka YOKOTA.It Ar N
495f5c73cbbSKazutaka YOKOTAReport down events for the virtual buttons
4965f436cfbSKazutaka YOKOTA.Ar N
4975f436cfbSKazutaka YOKOTAand
4985f436cfbSKazutaka YOKOTA.Ar N+1
499f5c73cbbSKazutaka YOKOTArespectively when negative and positive Z axis movement
500f2e366a1SSheldon Hearnis detected.
501f5c73cbbSKazutaka YOKOTAThere do not need to be physical buttons
5025f436cfbSKazutaka YOKOTA.Ar N
5035f436cfbSKazutaka YOKOTAand
5045f436cfbSKazutaka YOKOTA.Ar N+1 .
5055f436cfbSKazutaka YOKOTANote that mapping to logical buttons is carried out after mapping
5065f436cfbSKazutaka YOKOTAfrom the Z axis movement to the virtual buttons is done.
507e68b10b3SKazutaka YOKOTA.It Ar N1 N2
508f5c73cbbSKazutaka YOKOTAReport down events for the virtual buttons
509e68b10b3SKazutaka YOKOTA.Ar N1
510e68b10b3SKazutaka YOKOTAand
511e68b10b3SKazutaka YOKOTA.Ar N2
512f5c73cbbSKazutaka YOKOTArespectively when negative and positive Z axis movement
513e68b10b3SKazutaka YOKOTAis detected.
514e68b10b3SKazutaka YOKOTA.It Ar N1 N2 N3 N4
515e68b10b3SKazutaka YOKOTAThis is useful for the mouse with two wheels of which
516e68b10b3SKazutaka YOKOTAthe second wheel is used to generate horizontal scroll action,
517e68b10b3SKazutaka YOKOTAand for the mouse which has a knob or a stick which can detect
518e68b10b3SKazutaka YOKOTAthe horizontal force applied by the user.
519e68b10b3SKazutaka YOKOTA.Pp
520e68b10b3SKazutaka YOKOTAThe motion of the second wheel will be mapped to the buttons
521e68b10b3SKazutaka YOKOTA.Ar N3 ,
522e68b10b3SKazutaka YOKOTAfor the negative direction, and
523e68b10b3SKazutaka YOKOTA.Ar N4 ,
524e68b10b3SKazutaka YOKOTAfor the positive direction.
525e68b10b3SKazutaka YOKOTAIf the buttons
526e68b10b3SKazutaka YOKOTA.Ar N3
527e68b10b3SKazutaka YOKOTAand
528e68b10b3SKazutaka YOKOTA.Ar N4
529f5c73cbbSKazutaka YOKOTAactually exist in this mouse, their actions will not be detected.
530e68b10b3SKazutaka YOKOTA.Pp
531e68b10b3SKazutaka YOKOTANote that horizontal movement or second roller/wheel movement may not
532e68b10b3SKazutaka YOKOTAalways be detected,
533e68b10b3SKazutaka YOKOTAbecause there appears to be no accepted standard as to how it is encoded.
534e68b10b3SKazutaka YOKOTA.Pp
53575c07b90SChristian BruefferNote also that some mice think left is the negative horizontal direction;
536e68b10b3SKazutaka YOKOTAothers may think otherwise.
537e68b10b3SKazutaka YOKOTAMoreover, there are some mice whose two wheels are both mounted vertically,
538e68b10b3SKazutaka YOKOTAand the direction of the second vertical wheel does not match the
53975c07b90SChristian Bruefferfirst one.
5405f436cfbSKazutaka YOKOTA.El
5415f436cfbSKazutaka YOKOTA.El
542f8b013e2SKazutaka YOKOTA.Ss Configuring Mouse Daemon
5435f436cfbSKazutaka YOKOTAThe first thing you need to know is the interface type
5445f436cfbSKazutaka YOKOTAof the mouse you are going to use.
5455f436cfbSKazutaka YOKOTAIt can be determined by looking at the connector of the mouse.
5465f436cfbSKazutaka YOKOTAThe serial mouse has a D-Sub female 9- or 25-pin connector.
5475f436cfbSKazutaka YOKOTAThe bus and InPort mice have either a D-Sub male 9-pin connector
5485f436cfbSKazutaka YOKOTAor a round DIN 9-pin connector.
5495f436cfbSKazutaka YOKOTAThe PS/2 mouse is equipped with a small, round DIN 6-pin connector.
5505f436cfbSKazutaka YOKOTASome mice come with adapters with which the connector can
55107bfccd7SRuslan Ermilovbe converted to another.
55207bfccd7SRuslan ErmilovIf you are to use such an adapter,
5535f436cfbSKazutaka YOKOTAremember the connector at the very end of the mouse/adapter pair is
5545f436cfbSKazutaka YOKOTAwhat matters.
555045c8108SKazutaka YOKOTAThe USB mouse has a flat rectangular connector.
5565f436cfbSKazutaka YOKOTA.Pp
5575f436cfbSKazutaka YOKOTAThe next thing to decide is a port to use for the given interface.
5585f436cfbSKazutaka YOKOTAFor the bus, InPort and PS/2 mice, there is little choice:
5595f436cfbSKazutaka YOKOTAthe bus and InPort mice always use
5605f436cfbSKazutaka YOKOTA.Pa /dev/mse0 ,
5615f436cfbSKazutaka YOKOTAand the PS/2 mouse is always at
5625f436cfbSKazutaka YOKOTA.Pa /dev/psm0 .
5635f436cfbSKazutaka YOKOTAThere may be more than one serial port to which the serial
56407bfccd7SRuslan Ermilovmouse can be attached.
56507bfccd7SRuslan ErmilovMany people often assign the first, built-in
5665f436cfbSKazutaka YOKOTAserial port
567d0139887SPhilip Paeps.Pa /dev/cuad0
5685f436cfbSKazutaka YOKOTAto the mouse.
569045c8108SKazutaka YOKOTAYou can attach multiple USB mice to your system or to your USB hub.
570045c8108SKazutaka YOKOTAThey are accessible as
571045c8108SKazutaka YOKOTA.Pa /dev/ums0 , /dev/ums1 ,
572045c8108SKazutaka YOKOTAand so on.
57359bd9500SSimon L. B. Nielsen.Pp
5745f436cfbSKazutaka YOKOTAYou may want to create a symbolic link
5755f436cfbSKazutaka YOKOTA.Pa /dev/mouse
5765f436cfbSKazutaka YOKOTApointing to the real port to which the mouse is connected, so that you
57759bd9500SSimon L. B. Nielsencan easily distinguish which is your
57859bd9500SSimon L. B. Nielsen.Dq mouse
57959bd9500SSimon L. B. Nielsenport later.
5805f436cfbSKazutaka YOKOTA.Pp
5815f436cfbSKazutaka YOKOTAThe next step is to guess the appropriate protocol type for the mouse.
5825f436cfbSKazutaka YOKOTAThe
5835f436cfbSKazutaka YOKOTA.Nm
584490d5836SPhilippe Charnierutility may be able to automatically determine the protocol type.
5855f436cfbSKazutaka YOKOTARun the
5865f436cfbSKazutaka YOKOTA.Nm
587490d5836SPhilippe Charnierutility with the
5885f436cfbSKazutaka YOKOTA.Fl i
58907bfccd7SRuslan Ermilovoption and see what it says.
59007bfccd7SRuslan ErmilovIf the command can identify
5915f436cfbSKazutaka YOKOTAthe protocol type, no further investigation is necessary on your part.
5925f436cfbSKazutaka YOKOTAYou may start the daemon without explicitly specifying a protocol type
593c4d9468eSRuslan Ermilov(see
594c4d9468eSRuslan Ermilov.Sx EXAMPLES ) .
5955f436cfbSKazutaka YOKOTA.Pp
5965f436cfbSKazutaka YOKOTAThe command may print
5975f436cfbSKazutaka YOKOTA.Ar sysmouse
5985f436cfbSKazutaka YOKOTAif the mouse driver supports this protocol type.
5995f436cfbSKazutaka YOKOTA.Pp
6005f436cfbSKazutaka YOKOTANote that the
6015f436cfbSKazutaka YOKOTA.Dv type
6025f436cfbSKazutaka YOKOTAand
6035f436cfbSKazutaka YOKOTA.Dv model
6045f436cfbSKazutaka YOKOTAprinted by the
6055f436cfbSKazutaka YOKOTA.Fl i
6065f436cfbSKazutaka YOKOTAoption do not necessarily match the product name of the pointing device
6075f436cfbSKazutaka YOKOTAin question, but they may give the name of the device with which it is
6085f436cfbSKazutaka YOKOTAcompatible.
6095f436cfbSKazutaka YOKOTA.Pp
6105f436cfbSKazutaka YOKOTAIf the
6115f436cfbSKazutaka YOKOTA.Fl i
6125f436cfbSKazutaka YOKOTAoption yields nothing, you need to specify a protocol type to the
6135f436cfbSKazutaka YOKOTA.Nm
614490d5836SPhilippe Charnierutility by the
6155f436cfbSKazutaka YOKOTA.Fl t
616f2e366a1SSheldon Hearnoption.
617f2e366a1SSheldon HearnYou have to make a guess and try.
6185f436cfbSKazutaka YOKOTAThere is rule of thumb:
6195f436cfbSKazutaka YOKOTA.Pp
620610a5778SRuslan Ermilov.Bl -enum -compact -width 1.X
621610a5778SRuslan Ermilov.It
6225f436cfbSKazutaka YOKOTAThe bus and InPort mice always use
6235f436cfbSKazutaka YOKOTA.Ar busmouse
6245f436cfbSKazutaka YOKOTAprotocol regardless of the brand of the mouse.
625610a5778SRuslan Ermilov.It
6265f436cfbSKazutaka YOKOTAThe
6275f436cfbSKazutaka YOKOTA.Ar ps/2
6285f436cfbSKazutaka YOKOTAprotocol should always be specified for the PS/2 mouse
6295f436cfbSKazutaka YOKOTAregardless of the brand of the mouse.
630610a5778SRuslan Ermilov.It
631045c8108SKazutaka YOKOTAYou must specify the
632045c8108SKazutaka YOKOTA.Ar auto
633045c8108SKazutaka YOKOTAprotocol for the USB mouse.
634610a5778SRuslan Ermilov.It
6355f436cfbSKazutaka YOKOTAMost 2-button serial mice support the
6365f436cfbSKazutaka YOKOTA.Ar microsoft
6375f436cfbSKazutaka YOKOTAprotocol.
638610a5778SRuslan Ermilov.It
6395f436cfbSKazutaka YOKOTA3-button serial mice may work with the
6405f436cfbSKazutaka YOKOTA.Ar mousesystems
641f2e366a1SSheldon Hearnprotocol.
642f5c73cbbSKazutaka YOKOTAIf it does not, it may work with the
6435f436cfbSKazutaka YOKOTA.Ar microsoft
6445f436cfbSKazutaka YOKOTAprotocol although
645f5c73cbbSKazutaka YOKOTAthe third (middle) button will not function.
6465f436cfbSKazutaka YOKOTA3-button serial mice may also work with the
6475f436cfbSKazutaka YOKOTA.Ar mouseman
6485f436cfbSKazutaka YOKOTAprotocol under which the third button may function as expected.
649610a5778SRuslan Ermilov.It
65059bd9500SSimon L. B. Nielsen3-button serial mice may have a small switch to choose between
65159bd9500SSimon L. B. Nielsen.Dq MS
65259bd9500SSimon L. B. Nielsenand
65359bd9500SSimon L. B. Nielsen.Dq PC ,
65459bd9500SSimon L. B. Nielsenor
65559bd9500SSimon L. B. Nielsen.Dq 2
65659bd9500SSimon L. B. Nielsenand
65759bd9500SSimon L. B. Nielsen.Dq 3 .
65859bd9500SSimon L. B. Nielsen.Dq MS
65959bd9500SSimon L. B. Nielsenor
66059bd9500SSimon L. B. Nielsen.Dq 2
66159bd9500SSimon L. B. Nielsenusually mean the
6625f436cfbSKazutaka YOKOTA.Ar microsoft
6635f436cfbSKazutaka YOKOTAprotocol.
66459bd9500SSimon L. B. Nielsen.Dq PC
66559bd9500SSimon L. B. Nielsenor
66659bd9500SSimon L. B. Nielsen.Dq 3
66759bd9500SSimon L. B. Nielsenwill choose the
6685f436cfbSKazutaka YOKOTA.Ar mousesystems
6695f436cfbSKazutaka YOKOTAprotocol.
670610a5778SRuslan Ermilov.It
6715f436cfbSKazutaka YOKOTAIf the mouse has a roller or a wheel, it may be compatible with the
6725f436cfbSKazutaka YOKOTA.Ar intellimouse
6735f436cfbSKazutaka YOKOTAprotocol.
6745f436cfbSKazutaka YOKOTA.El
6755f436cfbSKazutaka YOKOTA.Pp
6765f436cfbSKazutaka YOKOTATo test if the selected protocol type is correct for the given mouse,
6775f436cfbSKazutaka YOKOTAenable the mouse pointer in the current virtual console,
6785f436cfbSKazutaka YOKOTA.Pp
679bc84aa4bSRuslan Ermilov.Dl "vidcontrol -m on"
6805f436cfbSKazutaka YOKOTA.Pp
6815f436cfbSKazutaka YOKOTAstart the mouse daemon in the foreground mode,
6825f436cfbSKazutaka YOKOTA.Pp
683bc84aa4bSRuslan Ermilov.Dl "moused -f -p <selected_port> -t <selected_protocol>"
6845f436cfbSKazutaka YOKOTA.Pp
6855f436cfbSKazutaka YOKOTAand see if the mouse pointer travels correctly
686f2e366a1SSheldon Hearnaccording to the mouse movement.
687f2e366a1SSheldon HearnThen try cut & paste features by
688f2e366a1SSheldon Hearnclicking the left, right and middle buttons.
689f2e366a1SSheldon HearnType ^C to stop
6905f436cfbSKazutaka YOKOTAthe command.
6915f436cfbSKazutaka YOKOTA.Ss Multiple Mice
6925f436cfbSKazutaka YOKOTAAs many instances of the mouse daemon as the number of mice attached to
6935f436cfbSKazutaka YOKOTAthe system may be run simultaneously; one
6945f436cfbSKazutaka YOKOTAinstance for each mouse.
6955f436cfbSKazutaka YOKOTAThis is useful if the user wants to use the built-in PS/2 pointing device
6965f436cfbSKazutaka YOKOTAof a laptop computer while on the road, but wants to use a serial
6975f436cfbSKazutaka YOKOTAmouse when s/he attaches the system to the docking station in the office.
6985f436cfbSKazutaka YOKOTARun two mouse daemons and tell the application program
699c4d9468eSRuslan Ermilov(such as the
700c4d9468eSRuslan Ermilov.Tn "X\ Window System" )
7015f436cfbSKazutaka YOKOTAto use
702f84e4bb7SPhilippe Charnier.Xr sysmouse 4 ,
70375c07b90SChristian Bruefferthen the application program will always see mouse data from either mouse.
7045f436cfbSKazutaka YOKOTAWhen the serial mouse is not attached, the corresponding mouse daemon
705f5c73cbbSKazutaka YOKOTAwill not detect any movement or button state change and the application
7065f436cfbSKazutaka YOKOTAprogram will only see mouse data coming from the daemon for the
707f2e366a1SSheldon HearnPS/2 mouse.
708f2e366a1SSheldon HearnIn contrast when both mice are attached and both of them
7095f436cfbSKazutaka YOKOTAare moved at the same time in this configuration,
7105f436cfbSKazutaka YOKOTAthe mouse pointer will travel across the screen just as if movement of
7115f436cfbSKazutaka YOKOTAthe mice is combined all together.
7125f436cfbSKazutaka YOKOTA.Sh FILES
7135f436cfbSKazutaka YOKOTA.Bl -tag -width /dev/consolectl -compact
7145f436cfbSKazutaka YOKOTA.It Pa /dev/consolectl
7155f436cfbSKazutaka YOKOTAdevice to control the console
7165f436cfbSKazutaka YOKOTA.It Pa /dev/mse%d
7175f436cfbSKazutaka YOKOTAbus and InPort mouse driver
7185f436cfbSKazutaka YOKOTA.It Pa /dev/psm%d
7195f436cfbSKazutaka YOKOTAPS/2 mouse driver
7205f436cfbSKazutaka YOKOTA.It Pa /dev/sysmouse
7215f436cfbSKazutaka YOKOTAvirtualized mouse driver
7225f436cfbSKazutaka YOKOTA.It Pa /dev/ttyv%d
7235f436cfbSKazutaka YOKOTAvirtual consoles
724045c8108SKazutaka YOKOTA.It Pa /dev/ums%d
725045c8108SKazutaka YOKOTAUSB mouse driver
726f82812a2SKazutaka YOKOTA.It Pa /var/run/moused.pid
727f82812a2SKazutaka YOKOTAprocess id of the currently running
728f82812a2SKazutaka YOKOTA.Nm
729490d5836SPhilippe Charnierutility
73067978692SAmancio Hasty.It Pa /var/run/MouseRemote
73167978692SAmancio HastyUNIX-domain stream socket for X10 MouseRemote events
73294a804c5SMike Pritchard.El
733251c176fSRuslan Ermilov.Sh EXAMPLES
734bc84aa4bSRuslan Ermilov.Dl "moused -p /dev/cuad0 -i type"
7355f436cfbSKazutaka YOKOTA.Pp
7365f436cfbSKazutaka YOKOTALet the
7375f436cfbSKazutaka YOKOTA.Nm
738490d5836SPhilippe Charnierutility determine the protocol type of the mouse at the serial port
739d0139887SPhilip Paeps.Pa /dev/cuad0 .
7405f436cfbSKazutaka YOKOTAIf successful, the command will print the type, otherwise it will say
74159bd9500SSimon L. B. Nielsen.Dq Li unknown .
742bc84aa4bSRuslan Ermilov.Bd -literal -offset indent
743bc84aa4bSRuslan Ermilovmoused -p /dev/cuad0
744bc84aa4bSRuslan Ermilovvidcontrol -m on
745bc84aa4bSRuslan Ermilov.Ed
746bf29452fSWolfram Schneider.Pp
7475f436cfbSKazutaka YOKOTAIf the
7485f436cfbSKazutaka YOKOTA.Nm
749490d5836SPhilippe Charnierutility is able to identify the protocol type of the mouse at the specified
7505f436cfbSKazutaka YOKOTAport automatically, you can start the daemon without the
7515f436cfbSKazutaka YOKOTA.Fl t
7525f436cfbSKazutaka YOKOTAoption and enable the mouse pointer in the text console as above.
753bc84aa4bSRuslan Ermilov.Bd -literal -offset indent
754bc84aa4bSRuslan Ermilovmoused -p /dev/mouse -t microsoft
755bc84aa4bSRuslan Ermilovvidcontrol -m on
756bc84aa4bSRuslan Ermilov.Ed
7575f436cfbSKazutaka YOKOTA.Pp
7585f436cfbSKazutaka YOKOTAStart the mouse daemon on the serial port
7595f436cfbSKazutaka YOKOTA.Pa /dev/mouse .
7605f436cfbSKazutaka YOKOTAThe protocol type
7615f436cfbSKazutaka YOKOTA.Ar microsoft
7625f436cfbSKazutaka YOKOTAis explicitly specified by the
7635f436cfbSKazutaka YOKOTA.Fl t
7645f436cfbSKazutaka YOKOTAoption.
7655f436cfbSKazutaka YOKOTA.Pp
766bc84aa4bSRuslan Ermilov.Dl "moused -p /dev/mouse -m 1=3 -m 3=1"
7675f436cfbSKazutaka YOKOTA.Pp
7685f436cfbSKazutaka YOKOTAAssign the physical button 3 (right button) to the logical button 1
7695f436cfbSKazutaka YOKOTA(logical left) and the physical button 1 (left) to the logical
7705f436cfbSKazutaka YOKOTAbutton 3 (logical right).
7715f436cfbSKazutaka YOKOTAThis will effectively swap the left and right buttons.
7725f436cfbSKazutaka YOKOTA.Pp
773bc84aa4bSRuslan Ermilov.Dl "moused -p /dev/mouse -t intellimouse -z 4"
7745f436cfbSKazutaka YOKOTA.Pp
7750d64fcd8SDavid E. O'BrienReport negative Z axis movement (i.e., mouse wheel) as the button 4 pressed
7760d64fcd8SDavid E. O'Brienand positive Z axis movement (i.e., mouse wheel) as the button 5 pressed.
7779eac5bb9SPhilip Paeps.Pp
7789eac5bb9SPhilip PaepsIf you add
7799eac5bb9SPhilip Paeps.Pp
780bc84aa4bSRuslan Ermilov.Dl "ALL ALL = NOPASSWD: /usr/bin/killall -USR1 moused"
7819eac5bb9SPhilip Paeps.Pp
7829eac5bb9SPhilip Paepsto your
7839eac5bb9SPhilip Paeps.Pa /usr/local/etc/sudoers
7849eac5bb9SPhilip Paepsfile, and bind
7859eac5bb9SPhilip Paeps.Pp
786bc84aa4bSRuslan Ermilov.Dl "killall -USR1 moused"
7879eac5bb9SPhilip Paeps.Pp
7889eac5bb9SPhilip Paepsto a key in your window manager, you can suspend mouse events on your laptop if
7899eac5bb9SPhilip Paepsyou keep brushing over the mouse pad while typing.
79094a804c5SMike Pritchard.Sh SEE ALSO
7915f436cfbSKazutaka YOKOTA.Xr kill 1 ,
7925cf470d6SWolfram Schneider.Xr vidcontrol 1 ,
79386b3ea36SPhilip Paeps.Xr xset 1 ,
79494a804c5SMike Pritchard.Xr keyboard 4 ,
7955f436cfbSKazutaka YOKOTA.Xr mse 4 ,
7965f436cfbSKazutaka YOKOTA.Xr psm 4 ,
797b7d50183SWolfram Schneider.Xr screen 4 ,
798045c8108SKazutaka YOKOTA.Xr sysmouse 4 ,
799045c8108SKazutaka YOKOTA.Xr ums 4
800251c176fSRuslan Ermilov.Sh STANDARDS
8015f436cfbSKazutaka YOKOTAThe
8025f436cfbSKazutaka YOKOTA.Nm
803490d5836SPhilippe Charnierutility partially supports
80479d8f01cSAlexey Zelkin.Dq Plug and Play External COM Device Specification
8055f436cfbSKazutaka YOKOTAin order to support PnP serial mice.
8065f436cfbSKazutaka YOKOTAHowever, due to various degrees of conformance to the specification by
8075f436cfbSKazutaka YOKOTAexisting serial mice, it does not strictly follow the version 1.0 of the
808f2e366a1SSheldon Hearnstandard.
809f2e366a1SSheldon HearnEven with this less strict approach,
8105f436cfbSKazutaka YOKOTAit may not always determine an appropriate protocol type
8115f436cfbSKazutaka YOKOTAfor the given serial mouse.
81259a3c79dSRuslan Ermilov.Sh HISTORY
81359a3c79dSRuslan ErmilovThe
81459a3c79dSRuslan Ermilov.Nm
81559a3c79dSRuslan Ermilovutility first appeared in
81659a3c79dSRuslan Ermilov.Fx 2.2 .
81794a804c5SMike Pritchard.Sh AUTHORS
818f4d874a1SRuslan Ermilov.An -nosplit
81994a804c5SMike PritchardThe
82094a804c5SMike Pritchard.Nm
821490d5836SPhilippe Charnierutility was written by
8222dcf9f10SSteve Price.An Michael Smith Aq msmith@FreeBSD.org .
8235f436cfbSKazutaka YOKOTAThis manual page was written by
82407e1d533SPhilippe Charnier.An Mike Pritchard Aq mpp@FreeBSD.org .
8252dcf9f10SSteve PriceThe command and manual page have since been updated by
8262dcf9f10SSteve Price.An Kazutaka Yokota Aq yokota@FreeBSD.org .
8270afc94c1SUlrich Spörlein.Sh CAVEATS
8280afc94c1SUlrich SpörleinMany pad devices behave as if the first (left) button were pressed if
8290afc94c1SUlrich Spörleinthe user
8300afc94c1SUlrich Spörlein.Dq taps
8310afc94c1SUlrich Spörleinthe surface of the pad.
8320afc94c1SUlrich SpörleinIn contrast, some ALPS GlidePoint and Interlink VersaPad models
8330afc94c1SUlrich Spörleintreat the tapping action
8340afc94c1SUlrich Spörleinas fourth button events.
8350afc94c1SUlrich SpörleinUse the option
8360afc94c1SUlrich Spörlein.Dq Fl m Li 1=4
8370afc94c1SUlrich Spörleinfor these models
8380afc94c1SUlrich Spörleinto obtain the same effect as the other pad devices.
8390afc94c1SUlrich Spörlein.Pp
8400afc94c1SUlrich SpörleinCut and paste functions in the virtual console assume that there
8410afc94c1SUlrich Spörleinare three buttons on the mouse.
8420afc94c1SUlrich SpörleinThe logical button 1 (logical left) selects a region of text in the
8430afc94c1SUlrich Spörleinconsole and copies it to the cut buffer.
8440afc94c1SUlrich SpörleinThe logical button 3 (logical right) extends the selected region.
8450afc94c1SUlrich SpörleinThe logical button 2 (logical middle) pastes the selected text
8460afc94c1SUlrich Spörleinat the text cursor position.
8470afc94c1SUlrich SpörleinIf the mouse has only two buttons, the middle, `paste' button
8480afc94c1SUlrich Spörleinis not available.
8490afc94c1SUlrich SpörleinTo obtain the paste function, use the
8500afc94c1SUlrich Spörlein.Fl 3
8510afc94c1SUlrich Spörleinoption to emulate the middle button, or use the
8520afc94c1SUlrich Spörlein.Fl m
8530afc94c1SUlrich Spörleinoption to assign the physical right button to the logical middle button:
8540afc94c1SUlrich Spörlein.Dq Fl m Li 2=3 .
855