xref: /freebsd/usr.sbin/moused/moused.8 (revision de2ab11ff955faa32bfffe5b2401b444a7c138f2)
1*de2ab11fSAlexander Ziaee.\"-
2*de2ab11fSAlexander Ziaee.\" SPDX-License-Identifier: BSD-4-Clause
3*de2ab11fSAlexander Ziaee.\"
494a804c5SMike Pritchard.\" Copyright (c) 1996
594a804c5SMike Pritchard.\"	Mike Pritchard <mpp@FreeBSD.org>.  All rights reserved.
694a804c5SMike Pritchard.\"
794a804c5SMike Pritchard.\" Redistribution and use in source and binary forms, with or without
894a804c5SMike Pritchard.\" modification, are permitted provided that the following conditions
994a804c5SMike Pritchard.\" are met:
1094a804c5SMike Pritchard.\" 1. Redistributions of source code must retain the above copyright
1194a804c5SMike Pritchard.\"    notice, this list of conditions and the following disclaimer.
1294a804c5SMike Pritchard.\" 2. Redistributions in binary form must reproduce the above copyright
1394a804c5SMike Pritchard.\"    notice, this list of conditions and the following disclaimer in the
1494a804c5SMike Pritchard.\"    documentation and/or other materials provided with the distribution.
1594a804c5SMike Pritchard.\" 3. All advertising materials mentioning features or use of this software
1694a804c5SMike Pritchard.\"    must display the following acknowledgement:
1794a804c5SMike Pritchard.\"	This product includes software developed by Mike Pritchard.
1894a804c5SMike Pritchard.\" 4. Neither the name of the author nor the names of its contributors
1994a804c5SMike Pritchard.\"    may be used to endorse or promote products derived from this software
2094a804c5SMike Pritchard.\"    without specific prior written permission.
2194a804c5SMike Pritchard.\"
2294a804c5SMike Pritchard.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2394a804c5SMike Pritchard.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2494a804c5SMike Pritchard.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2594a804c5SMike Pritchard.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2694a804c5SMike Pritchard.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2794a804c5SMike Pritchard.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2894a804c5SMike Pritchard.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2994a804c5SMike Pritchard.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3094a804c5SMike Pritchard.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3194a804c5SMike Pritchard.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3294a804c5SMike Pritchard.\" SUCH DAMAGE.
3394a804c5SMike Pritchard.\"
34*de2ab11fSAlexander Ziaee.Dd July 7, 2024
3594a804c5SMike Pritchard.Dt MOUSED 8
36a4c37c81SRuslan Ermilov.Os
3794a804c5SMike Pritchard.Sh NAME
3894a804c5SMike Pritchard.Nm moused
39*de2ab11fSAlexander Ziaee.Nd pass mouse data to the system video console driver
4094a804c5SMike Pritchard.Sh SYNOPSIS
4194a804c5SMike Pritchard.Nm
42efe4cd6aSGeorge C A Reid.Op Fl DPRacdfs
43f82812a2SKazutaka YOKOTA.Op Fl I Ar file
445f436cfbSKazutaka YOKOTA.Op Fl F Ar rate
455f436cfbSKazutaka YOKOTA.Op Fl r Ar resolution
4694a804c5SMike Pritchard.Op Fl S Ar baudrate
473e95467cSPhilip Paeps.Op Fl VH Op Fl U Ar distance Fl L Ar distance
4886b3ea36SPhilip Paeps.Op Fl A Ar exp Ns Op , Ns Ar offset
49efe4cd6aSGeorge C A Reid.Op Fl a Ar X Ns Op , Ns Ar Y
505f436cfbSKazutaka YOKOTA.Op Fl C Ar threshold
515f436cfbSKazutaka YOKOTA.Op Fl m Ar N=M
529fb1d70cSKazutaka YOKOTA.Op Fl w Ar N
535f436cfbSKazutaka YOKOTA.Op Fl z Ar target
545f436cfbSKazutaka YOKOTA.Op Fl t Ar mousetype
5533282bf4SPhilip Paeps.Op Fl l Ar level
56e68b10b3SKazutaka YOKOTA.Op Fl 3 Op Fl E Ar timeout
57d5f2946aSPhilip Paeps.Op Fl T Ar distance Ns Op , Ns Ar time Ns Op , Ns Ar after
5894a804c5SMike Pritchard.Fl p Ar port
5994a804c5SMike Pritchard.Pp
605f436cfbSKazutaka YOKOTA.Nm
615f436cfbSKazutaka YOKOTA.Op Fl Pd
625f436cfbSKazutaka YOKOTA.Fl p Ar port
635f436cfbSKazutaka YOKOTA.Fl i Ar info
645f436cfbSKazutaka YOKOTA.Sh DESCRIPTION
65490d5836SPhilippe CharnierThe
665f436cfbSKazutaka YOKOTA.Nm
67490d5836SPhilippe Charnierutility and the console driver work together to support
685f436cfbSKazutaka YOKOTAmouse operation in the text console and user programs.
695f436cfbSKazutaka YOKOTAThey virtualize the mouse and provide user programs with mouse data
705f436cfbSKazutaka YOKOTAin the standard format
71c4d9468eSRuslan Ermilov(see
72c4d9468eSRuslan Ermilov.Xr sysmouse 4 ) .
735f436cfbSKazutaka YOKOTA.Pp
745f436cfbSKazutaka YOKOTAThe mouse daemon listens to the specified port for mouse data,
755f436cfbSKazutaka YOKOTAinterprets and then passes it via ioctls to the console driver.
765f436cfbSKazutaka YOKOTAThe mouse daemon
775f436cfbSKazutaka YOKOTAreports translation movement, button press/release
785f436cfbSKazutaka YOKOTAevents and movement of the roller or the wheel if available.
7959bd9500SSimon L. B. NielsenThe roller/wheel movement is reported as
8059bd9500SSimon L. B. Nielsen.Dq Z
8159bd9500SSimon L. B. Nielsenaxis movement.
825f436cfbSKazutaka YOKOTA.Pp
835f436cfbSKazutaka YOKOTAThe console driver will display the mouse pointer on the screen
845f436cfbSKazutaka YOKOTAand provide cut and paste functions if the mouse pointer is enabled
855f436cfbSKazutaka YOKOTAin the virtual console via
862f2ac2cbSChris Costello.Xr vidcontrol 1 .
875f436cfbSKazutaka YOKOTAIf
885f436cfbSKazutaka YOKOTA.Xr sysmouse 4
895f436cfbSKazutaka YOKOTAis opened by the user program, the console driver also passes the mouse
905f436cfbSKazutaka YOKOTAdata to the device so that the user program will see it.
915f436cfbSKazutaka YOKOTA.Pp
925f436cfbSKazutaka YOKOTAIf the mouse daemon receives the signal
935f436cfbSKazutaka YOKOTA.Dv SIGHUP ,
94bc84aa4bSRuslan Ermilovit will reopen the mouse port and reinitialize itself.
95bc84aa4bSRuslan ErmilovUseful if
965f436cfbSKazutaka YOKOTAthe mouse is attached/detached while the system is suspended.
975f436cfbSKazutaka YOKOTA.Pp
989eac5bb9SPhilip PaepsIf the mouse daemon receives the signal
999eac5bb9SPhilip Paeps.Dv SIGUSR1 ,
100bc84aa4bSRuslan Ermilovit will stop passing mouse events.
101bc84aa4bSRuslan ErmilovSending the signal
1029eac5bb9SPhilip Paeps.Dv SIGUSR1
103bc84aa4bSRuslan Ermilovagain will resume passing mouse events.
104bc84aa4bSRuslan ErmilovUseful if your typing on a laptop is
1059eac5bb9SPhilip Paepsinterrupted by accidentally touching the mouse pad.
1069eac5bb9SPhilip Paeps.Pp
1075f436cfbSKazutaka YOKOTAThe following options are available:
10894a804c5SMike Pritchard.Bl -tag -width indent
1095f436cfbSKazutaka YOKOTA.It Fl 3
110f2e366a1SSheldon HearnEmulate the third (middle) button for 2-button mice.
111f2e366a1SSheldon HearnIt is emulated
1125f436cfbSKazutaka YOKOTAby pressing the left and right physical buttons simultaneously.
1135f436cfbSKazutaka YOKOTA.It Fl C Ar threshold
1145f436cfbSKazutaka YOKOTASet double click speed as the maximum interval in msec between button clicks.
1155f436cfbSKazutaka YOKOTAWithout this option, the default value of 500 msec will be assumed.
1165f436cfbSKazutaka YOKOTAThis option will have effect only on the cut and paste operations
117f2e366a1SSheldon Hearnin the text mode console.
118f2e366a1SSheldon HearnThe user program which is reading mouse data
1195f436cfbSKazutaka YOKOTAvia
1205f436cfbSKazutaka YOKOTA.Xr sysmouse 4
121f5c73cbbSKazutaka YOKOTAwill not be affected.
12294a804c5SMike Pritchard.It Fl D
12394a804c5SMike PritchardLower DTR on the serial port.
1245f436cfbSKazutaka YOKOTAThis option is valid only if
1255f436cfbSKazutaka YOKOTA.Ar mousesystems
1265f436cfbSKazutaka YOKOTAis selected as the protocol type.
1275f436cfbSKazutaka YOKOTAThe DTR line may need to be dropped for a 3-button mouse
1285f436cfbSKazutaka YOKOTAto operate in the
1295f436cfbSKazutaka YOKOTA.Ar mousesystems
1305f436cfbSKazutaka YOKOTAmode.
131e68b10b3SKazutaka YOKOTA.It Fl E Ar timeout
132e68b10b3SKazutaka YOKOTAWhen the third button emulation is enabled
133c4d9468eSRuslan Ermilov(see above),
134e68b10b3SKazutaka YOKOTAthe
135e68b10b3SKazutaka YOKOTA.Nm
136490d5836SPhilippe Charnierutility waits
137e68b10b3SKazutaka YOKOTA.Ar timeout
138f5c73cbbSKazutaka YOKOTAmsec at most before deciding whether two buttons are being pressed
139e68b10b3SKazutaka YOKOTAsimultaneously.
1409c9d9993SKazutaka YOKOTAThe default timeout is 100 msec.
1415f436cfbSKazutaka YOKOTA.It Fl F Ar rate
1425f436cfbSKazutaka YOKOTASet the report rate (reports/sec) of the device if supported.
1433e95467cSPhilip Paeps.It Fl L Ar distance
1443e95467cSPhilip PaepsWhen
1453e95467cSPhilip Paeps.Dq Virtual Scrolling
1463e95467cSPhilip Paepsis enabled, the
1473e95467cSPhilip Paeps.Fl L
1483e95467cSPhilip Paepsoption can be used to set the
1493e95467cSPhilip Paeps.Ar distance
1503e95467cSPhilip Paeps(in pixels) that the mouse must move before a scroll event
15135a521b6SGordon Berglingis generated.
15235a521b6SGordon BerglingThis effectively controls the scrolling speed.
1533e95467cSPhilip PaepsThe default
1543e95467cSPhilip Paeps.Ar distance
1553e95467cSPhilip Paepsis 2 pixels.
1562c9b9132SPhilip Paeps.It Fl H
1572c9b9132SPhilip PaepsEnable
1582c9b9132SPhilip Paeps.Dq Horizontal Virtual Scrolling .
1592c9b9132SPhilip PaepsWith this option set, holding the middle mouse
1602c9b9132SPhilip Paepsbutton down will cause motion to be interpreted as
1612c9b9132SPhilip Paepshorizontal scrolling.
1622c9b9132SPhilip PaepsUse the
1632c9b9132SPhilip Paeps.Fl U
1642c9b9132SPhilip Paepsoption to set the distance the mouse must move before the scrolling mode is
1653e95467cSPhilip Paepsactivated and the
1663e95467cSPhilip Paeps.Fl L
1673e95467cSPhilip Paepsoption to set the scrolling speed.
16878ad5421SRuslan ErmilovThis option may be used with or without the
1692c9b9132SPhilip Paeps.Fl V
1702c9b9132SPhilip Paepsoption.
171f82812a2SKazutaka YOKOTA.It Fl I Ar file
172f82812a2SKazutaka YOKOTAWrite the process id of the
173f82812a2SKazutaka YOKOTA.Nm
174490d5836SPhilippe Charnierutility in the specified file.
175f82812a2SKazutaka YOKOTAWithout this option, the process id will be stored in
176f82812a2SKazutaka YOKOTA.Pa /var/run/moused.pid .
1775f436cfbSKazutaka YOKOTA.It Fl P
1785f436cfbSKazutaka YOKOTADo not start the Plug and Play COM device enumeration procedure
1795f436cfbSKazutaka YOKOTAwhen identifying the serial mouse.
1805f436cfbSKazutaka YOKOTAIf this option is given together with the
1815f436cfbSKazutaka YOKOTA.Fl i
1825f436cfbSKazutaka YOKOTAoption, the
1835f436cfbSKazutaka YOKOTA.Nm
184490d5836SPhilippe Charnierutility will not be able to print useful information for the serial mouse.
18594a804c5SMike Pritchard.It Fl R
18694a804c5SMike PritchardLower RTS on the serial port.
1875f436cfbSKazutaka YOKOTAThis option is valid only if
1885f436cfbSKazutaka YOKOTA.Ar mousesystems
1895f436cfbSKazutaka YOKOTAis selected as the protocol type by the
1905f436cfbSKazutaka YOKOTA.Fl t
191f2e366a1SSheldon Hearnoption below.
192f2e366a1SSheldon HearnIt is often used with the
1935f436cfbSKazutaka YOKOTA.Fl D
194f2e366a1SSheldon Hearnoption above.
195f2e366a1SSheldon HearnBoth RTS and DTR lines may need to be dropped for
1965f436cfbSKazutaka YOKOTAa 3-button mouse to operate in the
1975f436cfbSKazutaka YOKOTA.Ar mousesystems
1985f436cfbSKazutaka YOKOTAmode.
19994a804c5SMike Pritchard.It Fl S Ar baudrate
20094a804c5SMike PritchardSelect the baudrate for the serial port (1200 to 9600).
2015f436cfbSKazutaka YOKOTANot all serial mice support this option.
202d5f2946aSPhilip Paeps.It Fl T Ar distance Ns Op , Ns Ar time Ns Op , Ns Ar after
2038f3d766bSPhilip PaepsTerminate drift.
204d5f2946aSPhilip PaepsUse this option if mouse pointer slowly wanders when mouse is not moved.
205d5f2946aSPhilip PaepsMovements up to
206d5f2946aSPhilip Paeps.Ar distance
207d5f2946aSPhilip Paeps(for example 4) pixels (X+Y) in
208d5f2946aSPhilip Paeps.Ar time
209d5f2946aSPhilip Paepsmsec (default 500) are ignored, except during
210d5f2946aSPhilip Paeps.Ar after
211d5f2946aSPhilip Paepsmsec (default 4000) since last real mouse movement.
2122a669c47SPhilip Paeps.It Fl V
21359bd9500SSimon L. B. NielsenEnable
21459bd9500SSimon L. B. Nielsen.Dq Virtual Scrolling .
21559bd9500SSimon L. B. NielsenWith this option set, holding the middle mouse
21659bd9500SSimon L. B. Nielsenbutton down will cause motion to be interpreted as scrolling.
21759bd9500SSimon L. B. NielsenUse the
2182a669c47SPhilip Paeps.Fl U
2192a669c47SPhilip Paepsoption to set the distance the mouse must move before the scrolling mode is
2203e95467cSPhilip Paepsactivated and the
2213e95467cSPhilip Paeps.Fl L
2223e95467cSPhilip Paepsoption to set the scrolling speed.
223ba133278SPhilip Paeps.It Fl U Ar distance
224ba133278SPhilip PaepsWhen
225ba133278SPhilip Paeps.Dq Virtual Scrolling
226ba133278SPhilip Paepsis enabled, the
227ba133278SPhilip Paeps.Fl U
228ba133278SPhilip Paepsoption can be used to set the
229ba133278SPhilip Paeps.Ar distance
230ba133278SPhilip Paeps(in pixels) that the mouse must move before the scrolling
231ba133278SPhilip Paepsmode is activated.
232ba133278SPhilip PaepsThe default
233ba133278SPhilip Paeps.Ar distance
234ba133278SPhilip Paepsis 3 pixels.
23586b3ea36SPhilip Paeps.It Fl A Ar exp Ns Op , Ns Ar offset
23686b3ea36SPhilip PaepsApply exponential (dynamic) acceleration to mouse movements:
23786b3ea36SPhilip Paepsthe faster you move the mouse, the more it will be accelerated.
23886b3ea36SPhilip PaepsThat means that small mouse movements are not accelerated,
23986b3ea36SPhilip Paepsso they are still very accurate, while a faster movement will
24086b3ea36SPhilip Paepsdrive the pointer quickly across the screen.
24186b3ea36SPhilip Paeps.Pp
24286b3ea36SPhilip PaepsThe
24386b3ea36SPhilip Paeps.Ar exp
24486b3ea36SPhilip Paepsvalue specifies the exponent, which is basically
24535a521b6SGordon Berglingthe amount of acceleration.
24635a521b6SGordon BerglingUseful values are in the range 1.1 to 2.0, but it depends on
24735a521b6SGordon Berglingyour mouse hardware and your personal preference.
24835a521b6SGordon BerglingA value of 1.0 means no exponential acceleration.
24935a521b6SGordon BerglingA value of 2.0 means squared acceleration (i.e. if
25035a521b6SGordon Berglingyou move the mouse twice as fast, the pointer will move
25135a521b6SGordon Berglingfour times as fast on the screen).
25286b3ea36SPhilip PaepsValues beyond 2.0 are possible but not recommended.
25386b3ea36SPhilip PaepsA good value to start is probably 1.5.
25486b3ea36SPhilip Paeps.Pp
25586b3ea36SPhilip PaepsThe optional
25686b3ea36SPhilip Paeps.Ar offset
25735a521b6SGordon Berglingvalue specifies the distance at which the acceleration begins.
25835a521b6SGordon BerglingThe default is 1.0, which means that the acceleration is applied
25935a521b6SGordon Berglingto movements larger than one unit.
26086b3ea36SPhilip PaepsIf you specify a larger value, it takes more speed for
26186b3ea36SPhilip Paepsthe acceleration to kick in, i.e. the speed range for
26286b3ea36SPhilip Paepssmall and accurate movements is wider.
26386b3ea36SPhilip PaepsUsually the default should be sufficient, but if you're
26486b3ea36SPhilip Paepsnot satisfied with the behaviour, try a value of 2.0.
26586b3ea36SPhilip Paeps.Pp
26686b3ea36SPhilip PaepsNote that the
26786b3ea36SPhilip Paeps.Fl A
26886b3ea36SPhilip Paepsoption interacts badly with the X server's own acceleration,
26935a521b6SGordon Berglingwhich doesn't work very well anyway.
27035a521b6SGordon BerglingTherefore it is recommended to switch it off if necessary:
27186b3ea36SPhilip Paeps.Dq xset m 1 .
272efe4cd6aSGeorge C A Reid.It Fl a Ar X Ns Op , Ns Ar Y
273efe4cd6aSGeorge C A ReidAccelerate or decelerate the mouse input.
274efe4cd6aSGeorge C A ReidThis is a linear acceleration only.
275efe4cd6aSGeorge C A ReidValues less than 1.0 slow down movement, values greater than 1.0 speed it
276efe4cd6aSGeorge C A Reidup.
277efe4cd6aSGeorge C A ReidSpecifying only one value sets the acceleration for both axes.
27886b3ea36SPhilip Paeps.Pp
27986b3ea36SPhilip PaepsYou can use the
28086b3ea36SPhilip Paeps.Fl a
28186b3ea36SPhilip Paepsand
28286b3ea36SPhilip Paeps.Fl A
28386b3ea36SPhilip Paepsoptions at the same time to have the combined effect
28486b3ea36SPhilip Paepsof linear and exponential acceleration.
28594a804c5SMike Pritchard.It Fl c
2865f436cfbSKazutaka YOKOTASome mice report middle button down events
287f5c73cbbSKazutaka YOKOTAas if the left and right buttons are being pressed.
288f2e366a1SSheldon HearnThis option handles this.
28994a804c5SMike Pritchard.It Fl d
29094a804c5SMike PritchardEnable debugging messages.
29194a804c5SMike Pritchard.It Fl f
29294a804c5SMike PritchardDo not become a daemon and instead run as a foreground process.
2935f436cfbSKazutaka YOKOTAUseful for testing and debugging.
2945f436cfbSKazutaka YOKOTA.It Fl i Ar info
29507bfccd7SRuslan ErmilovPrint specified information and quit.
29607bfccd7SRuslan ErmilovAvailable pieces of
2975f436cfbSKazutaka YOKOTAinformation are:
2985f436cfbSKazutaka YOKOTA.Pp
2995f436cfbSKazutaka YOKOTA.Bl -tag -compact -width modelxxx
3005f436cfbSKazutaka YOKOTA.It Ar port
30157e4378bSRuslan ErmilovPort (device file) name, i.e.\&
302839f11a4SEitan Adler.Pa /dev/cuau0 ,
3035f436cfbSKazutaka YOKOTAand
3045f436cfbSKazutaka YOKOTA.Pa /dev/psm0 .
3055f436cfbSKazutaka YOKOTA.It Ar if
3065f436cfbSKazutaka YOKOTAInterface type: serial, bus, inport or ps/2.
3075f436cfbSKazutaka YOKOTA.It Ar type
308f2e366a1SSheldon HearnProtocol type.
309f2e366a1SSheldon HearnIt is one of the types listed under the
3105f436cfbSKazutaka YOKOTA.Fl t
3115f436cfbSKazutaka YOKOTAoption below or
3125f436cfbSKazutaka YOKOTA.Ar sysmouse
3135f436cfbSKazutaka YOKOTAif the driver supports the
3145f436cfbSKazutaka YOKOTA.Ar sysmouse
3155f436cfbSKazutaka YOKOTAdata format standard.
3165f436cfbSKazutaka YOKOTA.It Ar model
31707bfccd7SRuslan ErmilovMouse model.
31807bfccd7SRuslan ErmilovThe
3195f436cfbSKazutaka YOKOTA.Nm
320490d5836SPhilippe Charnierutility may not always be able to identify the model.
3215f436cfbSKazutaka YOKOTA.It Ar all
32207bfccd7SRuslan ErmilovAll of the above items.
32307bfccd7SRuslan ErmilovPrint port, interface, type and model in this order
3245f436cfbSKazutaka YOKOTAin one line.
3255f436cfbSKazutaka YOKOTA.El
3265f436cfbSKazutaka YOKOTA.Pp
3275f436cfbSKazutaka YOKOTAIf the
3285f436cfbSKazutaka YOKOTA.Nm
32959bd9500SSimon L. B. Nielsenutility cannot determine the requested information, it prints
33059bd9500SSimon L. B. Nielsen.Dq Li unknown
33159bd9500SSimon L. B. Nielsenor
33259bd9500SSimon L. B. Nielsen.Dq Li generic .
33333282bf4SPhilip Paeps.It Fl l Ar level
33433282bf4SPhilip PaepsSpecifies at which level
33533282bf4SPhilip Paeps.Nm
33633282bf4SPhilip Paepsshould operate the mouse driver.
33733282bf4SPhilip PaepsRefer to
3381a74e6a1SRuslan Ermilov.Sx Operation Levels
33933282bf4SPhilip Paepsin
34033282bf4SPhilip Paeps.Xr psm 4
34133282bf4SPhilip Paepsfor more information on this.
3425f436cfbSKazutaka YOKOTA.It Fl m Ar N=M
3435f436cfbSKazutaka YOKOTAAssign the physical button
3445f436cfbSKazutaka YOKOTA.Ar M
3455f436cfbSKazutaka YOKOTAto the logical button
3465f436cfbSKazutaka YOKOTA.Ar N .
3475f436cfbSKazutaka YOKOTAYou may specify as many instances of this option as you like.
3485f436cfbSKazutaka YOKOTAMore than one physical button may be assigned to a logical button at the
349f2e366a1SSheldon Hearnsame time.
350f2e366a1SSheldon HearnIn this case the logical button will be down,
3515f436cfbSKazutaka YOKOTAif either of the assigned physical buttons is held down.
35259bd9500SSimon L. B. NielsenDo not put space around
35359bd9500SSimon L. B. Nielsen.Ql = .
35494a804c5SMike Pritchard.It Fl p Ar port
35594a804c5SMike PritchardUse
35694a804c5SMike Pritchard.Ar port
3575f436cfbSKazutaka YOKOTAto communicate with the mouse.
3585f436cfbSKazutaka YOKOTA.It Fl r Ar resolution
3595f436cfbSKazutaka YOKOTASet the resolution of the device; in Dots Per Inch, or
3605f436cfbSKazutaka YOKOTA.Ar low ,
3615f436cfbSKazutaka YOKOTA.Ar medium-low ,
3625f436cfbSKazutaka YOKOTA.Ar medium-high
3635f436cfbSKazutaka YOKOTAor
3645f436cfbSKazutaka YOKOTA.Ar high .
3655f436cfbSKazutaka YOKOTAThis option may not be supported by all the device.
36694a804c5SMike Pritchard.It Fl s
36794a804c5SMike PritchardSelect a baudrate of 9600 for the serial line.
3685f436cfbSKazutaka YOKOTANot all serial mice support this option.
3695f436cfbSKazutaka YOKOTA.It Fl t Ar type
370f8b013e2SKazutaka YOKOTASpecify the protocol type of the mouse attached to the port.
37130ee7535SKazutaka YOKOTAYou may explicitly specify a type listed below, or use
37230ee7535SKazutaka YOKOTA.Ar auto
37330ee7535SKazutaka YOKOTAto let the
374f8b013e2SKazutaka YOKOTA.Nm
37575c07b90SChristian Bruefferutility automatically select an appropriate protocol for the given
37630ee7535SKazutaka YOKOTAmouse.
37775c07b90SChristian BruefferIf you entirely omit this option in the command line,
37830ee7535SKazutaka YOKOTA.Fl t Ar auto
37930ee7535SKazutaka YOKOTAis assumed.
38030ee7535SKazutaka YOKOTAUnder normal circumstances,
38130ee7535SKazutaka YOKOTAyou need to use this option only if the
38230ee7535SKazutaka YOKOTA.Nm
383490d5836SPhilippe Charnierutility is not able to detect the protocol automatically
38475c07b90SChristian Brueffer(see
385c4d9468eSRuslan Ermilov.Sx "Configuring Mouse Daemon" ) .
386f8b013e2SKazutaka YOKOTA.Pp
3879e65e45bSKazutaka YOKOTANote that if a protocol type is specified with this option, the
38830ee7535SKazutaka YOKOTA.Fl P
38930ee7535SKazutaka YOKOTAoption above is implied and Plug and Play COM device enumeration
39030ee7535SKazutaka YOKOTAprocedure will be disabled.
39130ee7535SKazutaka YOKOTA.Pp
3929e65e45bSKazutaka YOKOTAAlso note that if your mouse is attached to the PS/2 mouse port, you should
3939e65e45bSKazutaka YOKOTAalways choose
3949e65e45bSKazutaka YOKOTA.Ar auto
3959e65e45bSKazutaka YOKOTAor
3969e65e45bSKazutaka YOKOTA.Ar ps/2 ,
39707bfccd7SRuslan Ermilovregardless of the brand and model of the mouse.
39807bfccd7SRuslan ErmilovLikewise, if your
3999e65e45bSKazutaka YOKOTAmouse is attached to the bus mouse port, choose
4009e65e45bSKazutaka YOKOTA.Ar auto
4019e65e45bSKazutaka YOKOTAor
4029e65e45bSKazutaka YOKOTA.Ar busmouse .
4039e65e45bSKazutaka YOKOTASerial mouse protocols will not work with these mice.
4049e65e45bSKazutaka YOKOTA.Pp
405045c8108SKazutaka YOKOTAFor the USB mouse, the protocol must be
406045c8108SKazutaka YOKOTA.Ar auto .
407045c8108SKazutaka YOKOTANo other protocol will work with the USB mouse.
408045c8108SKazutaka YOKOTA.Pp
409f8b013e2SKazutaka YOKOTAValid types for this option are
4105f436cfbSKazutaka YOKOTAlisted below.
41194a804c5SMike Pritchard.Pp
4125f436cfbSKazutaka YOKOTAFor the serial mouse:
41394a804c5SMike Pritchard.Bl -tag -compact -width mousesystemsxxx
4145f436cfbSKazutaka YOKOTA.It Ar microsoft
41507bfccd7SRuslan ErmilovMicrosoft serial mouse protocol.
41607bfccd7SRuslan ErmilovMost 2-button serial mice use this protocol.
4175f436cfbSKazutaka YOKOTA.It Ar intellimouse
41807bfccd7SRuslan ErmilovMicrosoft IntelliMouse protocol.
41907bfccd7SRuslan ErmilovGenius NetMouse,
420490d5836SPhilippe Charnier.Tn ASCII
421490d5836SPhilippe CharnierMie Mouse,
4225f436cfbSKazutaka YOKOTALogitech MouseMan+ and FirstMouse+ use this protocol too.
4235f436cfbSKazutaka YOKOTAOther mice with a roller/wheel may be compatible with this protocol.
4245f436cfbSKazutaka YOKOTA.It Ar mousesystems
42507bfccd7SRuslan ErmilovMouseSystems 5-byte protocol.
42607bfccd7SRuslan Ermilov3-button mice may use this protocol.
4275f436cfbSKazutaka YOKOTA.It Ar mmseries
4285f436cfbSKazutaka YOKOTAMM Series mouse protocol.
4295f436cfbSKazutaka YOKOTA.It Ar logitech
43007bfccd7SRuslan ErmilovLogitech mouse protocol.
43107bfccd7SRuslan ErmilovNote that this is for old Logitech models.
4325f436cfbSKazutaka YOKOTA.Ar mouseman
4335f436cfbSKazutaka YOKOTAor
4345f436cfbSKazutaka YOKOTA.Ar intellimouse
4355f436cfbSKazutaka YOKOTAshould be specified for newer models.
4365f436cfbSKazutaka YOKOTA.It Ar mouseman
43707bfccd7SRuslan ErmilovLogitech MouseMan and TrackMan protocol.
43807bfccd7SRuslan ErmilovSome 3-button mice may be compatible
43907bfccd7SRuslan Ermilovwith this protocol.
44007bfccd7SRuslan ErmilovNote that MouseMan+ and FirstMouse+ use
4415f436cfbSKazutaka YOKOTA.Ar intellimouse
4425f436cfbSKazutaka YOKOTAprotocol rather than this one.
4435f436cfbSKazutaka YOKOTA.It Ar glidepoint
4445f436cfbSKazutaka YOKOTAALPS GlidePoint protocol.
4455f436cfbSKazutaka YOKOTA.It Ar thinkingmouse
4465f436cfbSKazutaka YOKOTAKensington ThinkingMouse protocol.
447929cbbf2SDoug White.It Ar mmhitab
4485f436cfbSKazutaka YOKOTAHitachi tablet protocol.
44967978692SAmancio Hasty.It Ar x10mouseremote
45067978692SAmancio HastyX10 MouseRemote.
4511b11ca6cSKazutaka YOKOTA.It Ar kidspad
4521b11ca6cSKazutaka YOKOTAGenius Kidspad and Easypad protocol.
4532e09fb67SKazutaka YOKOTA.It Ar versapad
4542e09fb67SKazutaka YOKOTAInterlink VersaPad protocol.
455ce99e877SMatthew N. Dodd.It Ar gtco_digipad
456ce99e877SMatthew N. DoddGTCO Digipad protocol.
457224f83d2SGlen Barber.El
4585f436cfbSKazutaka YOKOTA.Pp
4595f436cfbSKazutaka YOKOTAFor the bus and InPort mouse:
4605f436cfbSKazutaka YOKOTA.Bl -tag -compact -width mousesystemsxxx
4615f436cfbSKazutaka YOKOTA.It Ar busmouse
4625f436cfbSKazutaka YOKOTAThis is the only protocol type available for
4635f436cfbSKazutaka YOKOTAthe bus and InPort mouse and should be specified for any bus mice
4645f436cfbSKazutaka YOKOTAand InPort mice, regardless of the brand.
4655f436cfbSKazutaka YOKOTA.El
4665f436cfbSKazutaka YOKOTA.Pp
4675f436cfbSKazutaka YOKOTAFor the PS/2 mouse:
4685f436cfbSKazutaka YOKOTA.Bl -tag -compact -width mousesystemsxxx
4695f436cfbSKazutaka YOKOTA.It Ar ps/2
4705f436cfbSKazutaka YOKOTAThis is the only protocol type available for the PS/2 mouse
4715f436cfbSKazutaka YOKOTAand should be specified for any PS/2 mice, regardless of the brand.
4725f436cfbSKazutaka YOKOTA.El
473045c8108SKazutaka YOKOTA.Pp
474045c8108SKazutaka YOKOTAFor the USB mouse,
475045c8108SKazutaka YOKOTA.Ar auto
476045c8108SKazutaka YOKOTAis the only protocol type available for the USB mouse
477045c8108SKazutaka YOKOTAand should be specified for any USB mice, regardless of the brand.
4789fb1d70cSKazutaka YOKOTA.It Fl w Ar N
4799fb1d70cSKazutaka YOKOTAMake the physical button
4809fb1d70cSKazutaka YOKOTA.Ar N
4819fb1d70cSKazutaka YOKOTAact as the wheel mode button.
4829fb1d70cSKazutaka YOKOTAWhile this button is pressed, X and Y axis movement is reported to be zero
4839fb1d70cSKazutaka YOKOTAand the Y axis movement is mapped to Z axis.
4849fb1d70cSKazutaka YOKOTAYou may further map the Z axis movement to virtual buttons by the
4859fb1d70cSKazutaka YOKOTA.Fl z
4869fb1d70cSKazutaka YOKOTAoption below.
4875f436cfbSKazutaka YOKOTA.It Fl z Ar target
4885f436cfbSKazutaka YOKOTAMap Z axis (roller/wheel) movement to another axis or to virtual buttons.
4895f436cfbSKazutaka YOKOTAValid
4905f436cfbSKazutaka YOKOTA.Ar target
4915f436cfbSKazutaka YOKOTAmaybe:
4925f436cfbSKazutaka YOKOTA.Bl -tag -compact -width x__
4935f436cfbSKazutaka YOKOTA.It Ar x
4945f436cfbSKazutaka YOKOTA.It Ar y
4955f436cfbSKazutaka YOKOTAX or Y axis movement will be reported when the Z axis movement is detected.
4965f436cfbSKazutaka YOKOTA.It Ar N
497f5c73cbbSKazutaka YOKOTAReport down events for the virtual buttons
4985f436cfbSKazutaka YOKOTA.Ar N
4995f436cfbSKazutaka YOKOTAand
5005f436cfbSKazutaka YOKOTA.Ar N+1
501f5c73cbbSKazutaka YOKOTArespectively when negative and positive Z axis movement
502f2e366a1SSheldon Hearnis detected.
503f5c73cbbSKazutaka YOKOTAThere do not need to be physical buttons
5045f436cfbSKazutaka YOKOTA.Ar N
5055f436cfbSKazutaka YOKOTAand
5065f436cfbSKazutaka YOKOTA.Ar N+1 .
5075f436cfbSKazutaka YOKOTANote that mapping to logical buttons is carried out after mapping
5085f436cfbSKazutaka YOKOTAfrom the Z axis movement to the virtual buttons is done.
509e68b10b3SKazutaka YOKOTA.It Ar N1 N2
510f5c73cbbSKazutaka YOKOTAReport down events for the virtual buttons
511e68b10b3SKazutaka YOKOTA.Ar N1
512e68b10b3SKazutaka YOKOTAand
513e68b10b3SKazutaka YOKOTA.Ar N2
514f5c73cbbSKazutaka YOKOTArespectively when negative and positive Z axis movement
515e68b10b3SKazutaka YOKOTAis detected.
516e68b10b3SKazutaka YOKOTA.It Ar N1 N2 N3 N4
517e68b10b3SKazutaka YOKOTAThis is useful for the mouse with two wheels of which
518e68b10b3SKazutaka YOKOTAthe second wheel is used to generate horizontal scroll action,
519e68b10b3SKazutaka YOKOTAand for the mouse which has a knob or a stick which can detect
520e68b10b3SKazutaka YOKOTAthe horizontal force applied by the user.
521e68b10b3SKazutaka YOKOTA.Pp
522e68b10b3SKazutaka YOKOTAThe motion of the second wheel will be mapped to the buttons
523e68b10b3SKazutaka YOKOTA.Ar N3 ,
524e68b10b3SKazutaka YOKOTAfor the negative direction, and
525e68b10b3SKazutaka YOKOTA.Ar N4 ,
526e68b10b3SKazutaka YOKOTAfor the positive direction.
527e68b10b3SKazutaka YOKOTAIf the buttons
528e68b10b3SKazutaka YOKOTA.Ar N3
529e68b10b3SKazutaka YOKOTAand
530e68b10b3SKazutaka YOKOTA.Ar N4
531f5c73cbbSKazutaka YOKOTAactually exist in this mouse, their actions will not be detected.
532e68b10b3SKazutaka YOKOTA.Pp
533e68b10b3SKazutaka YOKOTANote that horizontal movement or second roller/wheel movement may not
534e68b10b3SKazutaka YOKOTAalways be detected,
535e68b10b3SKazutaka YOKOTAbecause there appears to be no accepted standard as to how it is encoded.
536e68b10b3SKazutaka YOKOTA.Pp
53775c07b90SChristian BruefferNote also that some mice think left is the negative horizontal direction;
538e68b10b3SKazutaka YOKOTAothers may think otherwise.
539e68b10b3SKazutaka YOKOTAMoreover, there are some mice whose two wheels are both mounted vertically,
540e68b10b3SKazutaka YOKOTAand the direction of the second vertical wheel does not match the
54175c07b90SChristian Bruefferfirst one.
5425f436cfbSKazutaka YOKOTA.El
5435f436cfbSKazutaka YOKOTA.El
544f8b013e2SKazutaka YOKOTA.Ss Configuring Mouse Daemon
5455f436cfbSKazutaka YOKOTAThe first thing you need to know is the interface type
5465f436cfbSKazutaka YOKOTAof the mouse you are going to use.
5475f436cfbSKazutaka YOKOTAIt can be determined by looking at the connector of the mouse.
5485f436cfbSKazutaka YOKOTAThe serial mouse has a D-Sub female 9- or 25-pin connector.
5495f436cfbSKazutaka YOKOTAThe bus and InPort mice have either a D-Sub male 9-pin connector
5505f436cfbSKazutaka YOKOTAor a round DIN 9-pin connector.
5515f436cfbSKazutaka YOKOTAThe PS/2 mouse is equipped with a small, round DIN 6-pin connector.
5525f436cfbSKazutaka YOKOTASome mice come with adapters with which the connector can
55307bfccd7SRuslan Ermilovbe converted to another.
55407bfccd7SRuslan ErmilovIf you are to use such an adapter,
5555f436cfbSKazutaka YOKOTAremember the connector at the very end of the mouse/adapter pair is
5565f436cfbSKazutaka YOKOTAwhat matters.
557045c8108SKazutaka YOKOTAThe USB mouse has a flat rectangular connector.
5585f436cfbSKazutaka YOKOTA.Pp
5595f436cfbSKazutaka YOKOTAThe next thing to decide is a port to use for the given interface.
560c1cdf6a4SWarner LoshThe PS/2 mouse is always at
5615f436cfbSKazutaka YOKOTA.Pa /dev/psm0 .
5625f436cfbSKazutaka YOKOTAThere may be more than one serial port to which the serial
56307bfccd7SRuslan Ermilovmouse can be attached.
56407bfccd7SRuslan ErmilovMany people often assign the first, built-in
5655f436cfbSKazutaka YOKOTAserial port
566839f11a4SEitan Adler.Pa /dev/cuau0
5675f436cfbSKazutaka YOKOTAto the mouse.
568045c8108SKazutaka YOKOTAYou can attach multiple USB mice to your system or to your USB hub.
569045c8108SKazutaka YOKOTAThey are accessible as
570045c8108SKazutaka YOKOTA.Pa /dev/ums0 , /dev/ums1 ,
571045c8108SKazutaka YOKOTAand so on.
57259bd9500SSimon L. B. Nielsen.Pp
5735f436cfbSKazutaka YOKOTAYou may want to create a symbolic link
5745f436cfbSKazutaka YOKOTA.Pa /dev/mouse
5755f436cfbSKazutaka YOKOTApointing to the real port to which the mouse is connected, so that you
57659bd9500SSimon L. B. Nielsencan easily distinguish which is your
57759bd9500SSimon L. B. Nielsen.Dq mouse
57859bd9500SSimon L. B. Nielsenport later.
5795f436cfbSKazutaka YOKOTA.Pp
5805f436cfbSKazutaka YOKOTAThe next step is to guess the appropriate protocol type for the mouse.
5815f436cfbSKazutaka YOKOTAThe
5825f436cfbSKazutaka YOKOTA.Nm
583490d5836SPhilippe Charnierutility may be able to automatically determine the protocol type.
5845f436cfbSKazutaka YOKOTARun the
5855f436cfbSKazutaka YOKOTA.Nm
586490d5836SPhilippe Charnierutility with the
5875f436cfbSKazutaka YOKOTA.Fl i
58807bfccd7SRuslan Ermilovoption and see what it says.
58907bfccd7SRuslan ErmilovIf the command can identify
5905f436cfbSKazutaka YOKOTAthe protocol type, no further investigation is necessary on your part.
5915f436cfbSKazutaka YOKOTAYou may start the daemon without explicitly specifying a protocol type
592c4d9468eSRuslan Ermilov(see
593c4d9468eSRuslan Ermilov.Sx EXAMPLES ) .
5945f436cfbSKazutaka YOKOTA.Pp
5955f436cfbSKazutaka YOKOTAThe command may print
5965f436cfbSKazutaka YOKOTA.Ar sysmouse
5975f436cfbSKazutaka YOKOTAif the mouse driver supports this protocol type.
5985f436cfbSKazutaka YOKOTA.Pp
5995f436cfbSKazutaka YOKOTANote that the
6005f436cfbSKazutaka YOKOTA.Dv type
6015f436cfbSKazutaka YOKOTAand
6025f436cfbSKazutaka YOKOTA.Dv model
6035f436cfbSKazutaka YOKOTAprinted by the
6045f436cfbSKazutaka YOKOTA.Fl i
6055f436cfbSKazutaka YOKOTAoption do not necessarily match the product name of the pointing device
6065f436cfbSKazutaka YOKOTAin question, but they may give the name of the device with which it is
6075f436cfbSKazutaka YOKOTAcompatible.
6085f436cfbSKazutaka YOKOTA.Pp
6095f436cfbSKazutaka YOKOTAIf the
6105f436cfbSKazutaka YOKOTA.Fl i
6115f436cfbSKazutaka YOKOTAoption yields nothing, you need to specify a protocol type to the
6125f436cfbSKazutaka YOKOTA.Nm
613490d5836SPhilippe Charnierutility by the
6145f436cfbSKazutaka YOKOTA.Fl t
615f2e366a1SSheldon Hearnoption.
616f2e366a1SSheldon HearnYou have to make a guess and try.
6175f436cfbSKazutaka YOKOTAThere is rule of thumb:
6185f436cfbSKazutaka YOKOTA.Pp
619610a5778SRuslan Ermilov.Bl -enum -compact -width 1.X
620610a5778SRuslan Ermilov.It
6215f436cfbSKazutaka YOKOTAThe bus and InPort mice always use
6225f436cfbSKazutaka YOKOTA.Ar busmouse
6235f436cfbSKazutaka YOKOTAprotocol regardless of the brand of the mouse.
624610a5778SRuslan Ermilov.It
6255f436cfbSKazutaka YOKOTAThe
6265f436cfbSKazutaka YOKOTA.Ar ps/2
6275f436cfbSKazutaka YOKOTAprotocol should always be specified for the PS/2 mouse
6285f436cfbSKazutaka YOKOTAregardless of the brand of the mouse.
629610a5778SRuslan Ermilov.It
630045c8108SKazutaka YOKOTAYou must specify the
631045c8108SKazutaka YOKOTA.Ar auto
632045c8108SKazutaka YOKOTAprotocol for the USB mouse.
633610a5778SRuslan Ermilov.It
6345f436cfbSKazutaka YOKOTAMost 2-button serial mice support the
6355f436cfbSKazutaka YOKOTA.Ar microsoft
6365f436cfbSKazutaka YOKOTAprotocol.
637610a5778SRuslan Ermilov.It
6385f436cfbSKazutaka YOKOTA3-button serial mice may work with the
6395f436cfbSKazutaka YOKOTA.Ar mousesystems
640f2e366a1SSheldon Hearnprotocol.
641f5c73cbbSKazutaka YOKOTAIf it does not, it may work with the
6425f436cfbSKazutaka YOKOTA.Ar microsoft
6435f436cfbSKazutaka YOKOTAprotocol although
644f5c73cbbSKazutaka YOKOTAthe third (middle) button will not function.
6455f436cfbSKazutaka YOKOTA3-button serial mice may also work with the
6465f436cfbSKazutaka YOKOTA.Ar mouseman
6475f436cfbSKazutaka YOKOTAprotocol under which the third button may function as expected.
648610a5778SRuslan Ermilov.It
64959bd9500SSimon L. B. Nielsen3-button serial mice may have a small switch to choose between
65059bd9500SSimon L. B. Nielsen.Dq MS
65159bd9500SSimon L. B. Nielsenand
65259bd9500SSimon L. B. Nielsen.Dq PC ,
65359bd9500SSimon L. B. Nielsenor
65459bd9500SSimon L. B. Nielsen.Dq 2
65559bd9500SSimon L. B. Nielsenand
65659bd9500SSimon L. B. Nielsen.Dq 3 .
65759bd9500SSimon L. B. Nielsen.Dq MS
65859bd9500SSimon L. B. Nielsenor
65959bd9500SSimon L. B. Nielsen.Dq 2
66059bd9500SSimon L. B. Nielsenusually mean the
6615f436cfbSKazutaka YOKOTA.Ar microsoft
6625f436cfbSKazutaka YOKOTAprotocol.
66359bd9500SSimon L. B. Nielsen.Dq PC
66459bd9500SSimon L. B. Nielsenor
66559bd9500SSimon L. B. Nielsen.Dq 3
66659bd9500SSimon L. B. Nielsenwill choose the
6675f436cfbSKazutaka YOKOTA.Ar mousesystems
6685f436cfbSKazutaka YOKOTAprotocol.
669610a5778SRuslan Ermilov.It
6705f436cfbSKazutaka YOKOTAIf the mouse has a roller or a wheel, it may be compatible with the
6715f436cfbSKazutaka YOKOTA.Ar intellimouse
6725f436cfbSKazutaka YOKOTAprotocol.
6735f436cfbSKazutaka YOKOTA.El
6745f436cfbSKazutaka YOKOTA.Pp
6755f436cfbSKazutaka YOKOTATo test if the selected protocol type is correct for the given mouse,
6765f436cfbSKazutaka YOKOTAenable the mouse pointer in the current virtual console,
6775f436cfbSKazutaka YOKOTA.Pp
678bc84aa4bSRuslan Ermilov.Dl "vidcontrol -m on"
6795f436cfbSKazutaka YOKOTA.Pp
6805f436cfbSKazutaka YOKOTAstart the mouse daemon in the foreground mode,
6815f436cfbSKazutaka YOKOTA.Pp
682bc84aa4bSRuslan Ermilov.Dl "moused -f -p <selected_port> -t <selected_protocol>"
6835f436cfbSKazutaka YOKOTA.Pp
6845f436cfbSKazutaka YOKOTAand see if the mouse pointer travels correctly
685f2e366a1SSheldon Hearnaccording to the mouse movement.
686f2e366a1SSheldon HearnThen try cut & paste features by
687f2e366a1SSheldon Hearnclicking the left, right and middle buttons.
688f2e366a1SSheldon HearnType ^C to stop
6895f436cfbSKazutaka YOKOTAthe command.
6905f436cfbSKazutaka YOKOTA.Ss Multiple Mice
6915f436cfbSKazutaka YOKOTAAs many instances of the mouse daemon as the number of mice attached to
6925f436cfbSKazutaka YOKOTAthe system may be run simultaneously; one
6935f436cfbSKazutaka YOKOTAinstance for each mouse.
6945f436cfbSKazutaka YOKOTAThis is useful if the user wants to use the built-in PS/2 pointing device
6955f436cfbSKazutaka YOKOTAof a laptop computer while on the road, but wants to use a serial
6965f436cfbSKazutaka YOKOTAmouse when s/he attaches the system to the docking station in the office.
6975f436cfbSKazutaka YOKOTARun two mouse daemons and tell the application program
698c4d9468eSRuslan Ermilov(such as the
699c4d9468eSRuslan Ermilov.Tn "X\ Window System" )
7005f436cfbSKazutaka YOKOTAto use
701f84e4bb7SPhilippe Charnier.Xr sysmouse 4 ,
70275c07b90SChristian Bruefferthen the application program will always see mouse data from either mouse.
7035f436cfbSKazutaka YOKOTAWhen the serial mouse is not attached, the corresponding mouse daemon
704f5c73cbbSKazutaka YOKOTAwill not detect any movement or button state change and the application
7055f436cfbSKazutaka YOKOTAprogram will only see mouse data coming from the daemon for the
706f2e366a1SSheldon HearnPS/2 mouse.
707f2e366a1SSheldon HearnIn contrast when both mice are attached and both of them
7085f436cfbSKazutaka YOKOTAare moved at the same time in this configuration,
7095f436cfbSKazutaka YOKOTAthe mouse pointer will travel across the screen just as if movement of
7105f436cfbSKazutaka YOKOTAthe mice is combined all together.
7115f436cfbSKazutaka YOKOTA.Sh FILES
7125f436cfbSKazutaka YOKOTA.Bl -tag -width /dev/consolectl -compact
7135f436cfbSKazutaka YOKOTA.It Pa /dev/consolectl
7145f436cfbSKazutaka YOKOTAdevice to control the console
7155f436cfbSKazutaka YOKOTA.It Pa /dev/psm%d
7165f436cfbSKazutaka YOKOTAPS/2 mouse driver
7175f436cfbSKazutaka YOKOTA.It Pa /dev/sysmouse
7185f436cfbSKazutaka YOKOTAvirtualized mouse driver
7195f436cfbSKazutaka YOKOTA.It Pa /dev/ttyv%d
7205f436cfbSKazutaka YOKOTAvirtual consoles
721045c8108SKazutaka YOKOTA.It Pa /dev/ums%d
722045c8108SKazutaka YOKOTAUSB mouse driver
723f82812a2SKazutaka YOKOTA.It Pa /var/run/moused.pid
724f82812a2SKazutaka YOKOTAprocess id of the currently running
725f82812a2SKazutaka YOKOTA.Nm
726490d5836SPhilippe Charnierutility
72767978692SAmancio Hasty.It Pa /var/run/MouseRemote
72867978692SAmancio HastyUNIX-domain stream socket for X10 MouseRemote events
72994a804c5SMike Pritchard.El
730251c176fSRuslan Ermilov.Sh EXAMPLES
731839f11a4SEitan Adler.Dl "moused -p /dev/cuau0 -i type"
7325f436cfbSKazutaka YOKOTA.Pp
7335f436cfbSKazutaka YOKOTALet the
7345f436cfbSKazutaka YOKOTA.Nm
735490d5836SPhilippe Charnierutility determine the protocol type of the mouse at the serial port
736839f11a4SEitan Adler.Pa /dev/cuau0 .
7375f436cfbSKazutaka YOKOTAIf successful, the command will print the type, otherwise it will say
73859bd9500SSimon L. B. Nielsen.Dq Li unknown .
739bc84aa4bSRuslan Ermilov.Bd -literal -offset indent
740839f11a4SEitan Adlermoused -p /dev/cuau0
741bc84aa4bSRuslan Ermilovvidcontrol -m on
742bc84aa4bSRuslan Ermilov.Ed
743bf29452fSWolfram Schneider.Pp
7445f436cfbSKazutaka YOKOTAIf the
7455f436cfbSKazutaka YOKOTA.Nm
746490d5836SPhilippe Charnierutility is able to identify the protocol type of the mouse at the specified
7475f436cfbSKazutaka YOKOTAport automatically, you can start the daemon without the
7485f436cfbSKazutaka YOKOTA.Fl t
7495f436cfbSKazutaka YOKOTAoption and enable the mouse pointer in the text console as above.
750bc84aa4bSRuslan Ermilov.Bd -literal -offset indent
751bc84aa4bSRuslan Ermilovmoused -p /dev/mouse -t microsoft
752bc84aa4bSRuslan Ermilovvidcontrol -m on
753bc84aa4bSRuslan Ermilov.Ed
7545f436cfbSKazutaka YOKOTA.Pp
7555f436cfbSKazutaka YOKOTAStart the mouse daemon on the serial port
7565f436cfbSKazutaka YOKOTA.Pa /dev/mouse .
7575f436cfbSKazutaka YOKOTAThe protocol type
7585f436cfbSKazutaka YOKOTA.Ar microsoft
7595f436cfbSKazutaka YOKOTAis explicitly specified by the
7605f436cfbSKazutaka YOKOTA.Fl t
7615f436cfbSKazutaka YOKOTAoption.
7625f436cfbSKazutaka YOKOTA.Pp
763bc84aa4bSRuslan Ermilov.Dl "moused -p /dev/mouse -m 1=3 -m 3=1"
7645f436cfbSKazutaka YOKOTA.Pp
7655f436cfbSKazutaka YOKOTAAssign the physical button 3 (right button) to the logical button 1
7665f436cfbSKazutaka YOKOTA(logical left) and the physical button 1 (left) to the logical
7675f436cfbSKazutaka YOKOTAbutton 3 (logical right).
7685f436cfbSKazutaka YOKOTAThis will effectively swap the left and right buttons.
7695f436cfbSKazutaka YOKOTA.Pp
770bc84aa4bSRuslan Ermilov.Dl "moused -p /dev/mouse -t intellimouse -z 4"
7715f436cfbSKazutaka YOKOTA.Pp
7720d64fcd8SDavid E. O'BrienReport negative Z axis movement (i.e., mouse wheel) as the button 4 pressed
7730d64fcd8SDavid E. O'Brienand positive Z axis movement (i.e., mouse wheel) as the button 5 pressed.
7749eac5bb9SPhilip Paeps.Pp
7759eac5bb9SPhilip PaepsIf you add
7769eac5bb9SPhilip Paeps.Pp
777bc84aa4bSRuslan Ermilov.Dl "ALL ALL = NOPASSWD: /usr/bin/killall -USR1 moused"
7789eac5bb9SPhilip Paeps.Pp
7799eac5bb9SPhilip Paepsto your
7809eac5bb9SPhilip Paeps.Pa /usr/local/etc/sudoers
7819eac5bb9SPhilip Paepsfile, and bind
7829eac5bb9SPhilip Paeps.Pp
783bc84aa4bSRuslan Ermilov.Dl "killall -USR1 moused"
7849eac5bb9SPhilip Paeps.Pp
7859eac5bb9SPhilip Paepsto a key in your window manager, you can suspend mouse events on your laptop if
7869eac5bb9SPhilip Paepsyou keep brushing over the mouse pad while typing.
78794a804c5SMike Pritchard.Sh SEE ALSO
7885f436cfbSKazutaka YOKOTA.Xr kill 1 ,
7895cf470d6SWolfram Schneider.Xr vidcontrol 1 ,
79086b3ea36SPhilip Paeps.Xr xset 1 ,
79194a804c5SMike Pritchard.Xr keyboard 4 ,
7925f436cfbSKazutaka YOKOTA.Xr psm 4 ,
793b7d50183SWolfram Schneider.Xr screen 4 ,
794045c8108SKazutaka YOKOTA.Xr sysmouse 4 ,
795045c8108SKazutaka YOKOTA.Xr ums 4
796251c176fSRuslan Ermilov.Sh STANDARDS
7975f436cfbSKazutaka YOKOTAThe
7985f436cfbSKazutaka YOKOTA.Nm
799490d5836SPhilippe Charnierutility partially supports
80079d8f01cSAlexey Zelkin.Dq Plug and Play External COM Device Specification
8015f436cfbSKazutaka YOKOTAin order to support PnP serial mice.
8025f436cfbSKazutaka YOKOTAHowever, due to various degrees of conformance to the specification by
8035f436cfbSKazutaka YOKOTAexisting serial mice, it does not strictly follow the version 1.0 of the
804f2e366a1SSheldon Hearnstandard.
805f2e366a1SSheldon HearnEven with this less strict approach,
8065f436cfbSKazutaka YOKOTAit may not always determine an appropriate protocol type
8075f436cfbSKazutaka YOKOTAfor the given serial mouse.
80859a3c79dSRuslan Ermilov.Sh HISTORY
80959a3c79dSRuslan ErmilovThe
81059a3c79dSRuslan Ermilov.Nm
81159a3c79dSRuslan Ermilovutility first appeared in
81259a3c79dSRuslan Ermilov.Fx 2.2 .
81394a804c5SMike Pritchard.Sh AUTHORS
814f4d874a1SRuslan Ermilov.An -nosplit
81594a804c5SMike PritchardThe
81694a804c5SMike Pritchard.Nm
817490d5836SPhilippe Charnierutility was written by
81801c2b8acSBaptiste Daroussin.An Michael Smith Aq Mt msmith@FreeBSD.org .
8195f436cfbSKazutaka YOKOTAThis manual page was written by
82001c2b8acSBaptiste Daroussin.An Mike Pritchard Aq Mt mpp@FreeBSD.org .
8212dcf9f10SSteve PriceThe command and manual page have since been updated by
82201c2b8acSBaptiste Daroussin.An Kazutaka Yokota Aq Mt yokota@FreeBSD.org .
8230afc94c1SUlrich Spörlein.Sh CAVEATS
8240afc94c1SUlrich SpörleinMany pad devices behave as if the first (left) button were pressed if
8250afc94c1SUlrich Spörleinthe user
8260afc94c1SUlrich Spörlein.Dq taps
8270afc94c1SUlrich Spörleinthe surface of the pad.
8280afc94c1SUlrich SpörleinIn contrast, some ALPS GlidePoint and Interlink VersaPad models
8290afc94c1SUlrich Spörleintreat the tapping action
8300afc94c1SUlrich Spörleinas fourth button events.
8310afc94c1SUlrich SpörleinUse the option
8320afc94c1SUlrich Spörlein.Dq Fl m Li 1=4
8330afc94c1SUlrich Spörleinfor these models
8340afc94c1SUlrich Spörleinto obtain the same effect as the other pad devices.
8350afc94c1SUlrich Spörlein.Pp
8360afc94c1SUlrich SpörleinCut and paste functions in the virtual console assume that there
8370afc94c1SUlrich Spörleinare three buttons on the mouse.
8380afc94c1SUlrich SpörleinThe logical button 1 (logical left) selects a region of text in the
8390afc94c1SUlrich Spörleinconsole and copies it to the cut buffer.
8400afc94c1SUlrich SpörleinThe logical button 3 (logical right) extends the selected region.
8410afc94c1SUlrich SpörleinThe logical button 2 (logical middle) pastes the selected text
8420afc94c1SUlrich Spörleinat the text cursor position.
8430afc94c1SUlrich SpörleinIf the mouse has only two buttons, the middle, `paste' button
8440afc94c1SUlrich Spörleinis not available.
8450afc94c1SUlrich SpörleinTo obtain the paste function, use the
8460afc94c1SUlrich Spörlein.Fl 3
8470afc94c1SUlrich Spörleinoption to emulate the middle button, or use the
8480afc94c1SUlrich Spörlein.Fl m
8490afc94c1SUlrich Spörleinoption to assign the physical right button to the logical middle button:
8500afc94c1SUlrich Spörlein.Dq Fl m Li 2=3 .
851