xref: /freebsd/usr.sbin/moused/moused.8 (revision 7a7741af18d6c8a804cc643cb7ecda9d730c6aa6)
1.\"-
2.\" SPDX-License-Identifier: BSD-4-Clause
3.\"
4.\" Copyright (c) 1996
5.\"	Mike Pritchard <mpp@FreeBSD.org>.  All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. All advertising materials mentioning features or use of this software
16.\"    must display the following acknowledgement:
17.\"	This product includes software developed by Mike Pritchard.
18.\" 4. Neither the name of the author nor the names of its contributors
19.\"    may be used to endorse or promote products derived from this software
20.\"    without specific prior written permission.
21.\"
22.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE.
33.\"
34.Dd July 7, 2024
35.Dt MOUSED 8
36.Os
37.Sh NAME
38.Nm moused
39.Nd pass mouse data to the system video console driver
40.Sh SYNOPSIS
41.Nm
42.Op Fl DPRacdfs
43.Op Fl I Ar file
44.Op Fl F Ar rate
45.Op Fl r Ar resolution
46.Op Fl S Ar baudrate
47.Op Fl VH Op Fl U Ar distance Fl L Ar distance
48.Op Fl A Ar exp Ns Op , Ns Ar offset
49.Op Fl a Ar X Ns Op , Ns Ar Y
50.Op Fl C Ar threshold
51.Op Fl m Ar N=M
52.Op Fl w Ar N
53.Op Fl z Ar target
54.Op Fl t Ar mousetype
55.Op Fl l Ar level
56.Op Fl 3 Op Fl E Ar timeout
57.Op Fl T Ar distance Ns Op , Ns Ar time Ns Op , Ns Ar after
58.Fl p Ar port
59.Pp
60.Nm
61.Op Fl Pd
62.Fl p Ar port
63.Fl i Ar info
64.Sh DESCRIPTION
65The
66.Nm
67utility and the console driver work together to support
68mouse operation in the text console and user programs.
69They virtualize the mouse and provide user programs with mouse data
70in the standard format
71(see
72.Xr sysmouse 4 ) .
73.Pp
74The mouse daemon listens to the specified port for mouse data,
75interprets and then passes it via ioctls to the console driver.
76The mouse daemon
77reports translation movement, button press/release
78events and movement of the roller or the wheel if available.
79The roller/wheel movement is reported as
80.Dq Z
81axis movement.
82.Pp
83The console driver will display the mouse pointer on the screen
84and provide cut and paste functions if the mouse pointer is enabled
85in the virtual console via
86.Xr vidcontrol 1 .
87If
88.Xr sysmouse 4
89is opened by the user program, the console driver also passes the mouse
90data to the device so that the user program will see it.
91.Pp
92If the mouse daemon receives the signal
93.Dv SIGHUP ,
94it will reopen the mouse port and reinitialize itself.
95Useful if
96the mouse is attached/detached while the system is suspended.
97.Pp
98If the mouse daemon receives the signal
99.Dv SIGUSR1 ,
100it will stop passing mouse events.
101Sending the signal
102.Dv SIGUSR1
103again will resume passing mouse events.
104Useful if your typing on a laptop is
105interrupted by accidentally touching the mouse pad.
106.Pp
107The following options are available:
108.Bl -tag -width indent
109.It Fl 3
110Emulate the third (middle) button for 2-button mice.
111It is emulated
112by pressing the left and right physical buttons simultaneously.
113.It Fl C Ar threshold
114Set double click speed as the maximum interval in msec between button clicks.
115Without this option, the default value of 500 msec will be assumed.
116This option will have effect only on the cut and paste operations
117in the text mode console.
118The user program which is reading mouse data
119via
120.Xr sysmouse 4
121will not be affected.
122.It Fl D
123Lower DTR on the serial port.
124This option is valid only if
125.Ar mousesystems
126is selected as the protocol type.
127The DTR line may need to be dropped for a 3-button mouse
128to operate in the
129.Ar mousesystems
130mode.
131.It Fl E Ar timeout
132When the third button emulation is enabled
133(see above),
134the
135.Nm
136utility waits
137.Ar timeout
138msec at most before deciding whether two buttons are being pressed
139simultaneously.
140The default timeout is 100 msec.
141.It Fl F Ar rate
142Set the report rate (reports/sec) of the device if supported.
143.It Fl L Ar distance
144When
145.Dq Virtual Scrolling
146is enabled, the
147.Fl L
148option can be used to set the
149.Ar distance
150(in pixels) that the mouse must move before a scroll event
151is generated.
152This effectively controls the scrolling speed.
153The default
154.Ar distance
155is 2 pixels.
156.It Fl H
157Enable
158.Dq Horizontal Virtual Scrolling .
159With this option set, holding the middle mouse
160button down will cause motion to be interpreted as
161horizontal scrolling.
162Use the
163.Fl U
164option to set the distance the mouse must move before the scrolling mode is
165activated and the
166.Fl L
167option to set the scrolling speed.
168This option may be used with or without the
169.Fl V
170option.
171.It Fl I Ar file
172Write the process id of the
173.Nm
174utility in the specified file.
175Without this option, the process id will be stored in
176.Pa /var/run/moused.pid .
177.It Fl P
178Do not start the Plug and Play COM device enumeration procedure
179when identifying the serial mouse.
180If this option is given together with the
181.Fl i
182option, the
183.Nm
184utility will not be able to print useful information for the serial mouse.
185.It Fl R
186Lower RTS on the serial port.
187This option is valid only if
188.Ar mousesystems
189is selected as the protocol type by the
190.Fl t
191option below.
192It is often used with the
193.Fl D
194option above.
195Both RTS and DTR lines may need to be dropped for
196a 3-button mouse to operate in the
197.Ar mousesystems
198mode.
199.It Fl S Ar baudrate
200Select the baudrate for the serial port (1200 to 9600).
201Not all serial mice support this option.
202.It Fl T Ar distance Ns Op , Ns Ar time Ns Op , Ns Ar after
203Terminate drift.
204Use this option if mouse pointer slowly wanders when mouse is not moved.
205Movements up to
206.Ar distance
207(for example 4) pixels (X+Y) in
208.Ar time
209msec (default 500) are ignored, except during
210.Ar after
211msec (default 4000) since last real mouse movement.
212.It Fl V
213Enable
214.Dq Virtual Scrolling .
215With this option set, holding the middle mouse
216button down will cause motion to be interpreted as scrolling.
217Use the
218.Fl U
219option to set the distance the mouse must move before the scrolling mode is
220activated and the
221.Fl L
222option to set the scrolling speed.
223.It Fl U Ar distance
224When
225.Dq Virtual Scrolling
226is enabled, the
227.Fl U
228option can be used to set the
229.Ar distance
230(in pixels) that the mouse must move before the scrolling
231mode is activated.
232The default
233.Ar distance
234is 3 pixels.
235.It Fl A Ar exp Ns Op , Ns Ar offset
236Apply exponential (dynamic) acceleration to mouse movements:
237the faster you move the mouse, the more it will be accelerated.
238That means that small mouse movements are not accelerated,
239so they are still very accurate, while a faster movement will
240drive the pointer quickly across the screen.
241.Pp
242The
243.Ar exp
244value specifies the exponent, which is basically
245the amount of acceleration.
246Useful values are in the range 1.1 to 2.0, but it depends on
247your mouse hardware and your personal preference.
248A value of 1.0 means no exponential acceleration.
249A value of 2.0 means squared acceleration (i.e. if
250you move the mouse twice as fast, the pointer will move
251four times as fast on the screen).
252Values beyond 2.0 are possible but not recommended.
253A good value to start is probably 1.5.
254.Pp
255The optional
256.Ar offset
257value specifies the distance at which the acceleration begins.
258The default is 1.0, which means that the acceleration is applied
259to movements larger than one unit.
260If you specify a larger value, it takes more speed for
261the acceleration to kick in, i.e. the speed range for
262small and accurate movements is wider.
263Usually the default should be sufficient, but if you're
264not satisfied with the behaviour, try a value of 2.0.
265.Pp
266Note that the
267.Fl A
268option interacts badly with the X server's own acceleration,
269which doesn't work very well anyway.
270Therefore it is recommended to switch it off if necessary:
271.Dq xset m 1 .
272.It Fl a Ar X Ns Op , Ns Ar Y
273Accelerate or decelerate the mouse input.
274This is a linear acceleration only.
275Values less than 1.0 slow down movement, values greater than 1.0 speed it
276up.
277Specifying only one value sets the acceleration for both axes.
278.Pp
279You can use the
280.Fl a
281and
282.Fl A
283options at the same time to have the combined effect
284of linear and exponential acceleration.
285.It Fl c
286Some mice report middle button down events
287as if the left and right buttons are being pressed.
288This option handles this.
289.It Fl d
290Enable debugging messages.
291.It Fl f
292Do not become a daemon and instead run as a foreground process.
293Useful for testing and debugging.
294.It Fl i Ar info
295Print specified information and quit.
296Available pieces of
297information are:
298.Pp
299.Bl -tag -compact -width modelxxx
300.It Ar port
301Port (device file) name, i.e.\&
302.Pa /dev/cuau0 ,
303and
304.Pa /dev/psm0 .
305.It Ar if
306Interface type: serial, bus, inport or ps/2.
307.It Ar type
308Protocol type.
309It is one of the types listed under the
310.Fl t
311option below or
312.Ar sysmouse
313if the driver supports the
314.Ar sysmouse
315data format standard.
316.It Ar model
317Mouse model.
318The
319.Nm
320utility may not always be able to identify the model.
321.It Ar all
322All of the above items.
323Print port, interface, type and model in this order
324in one line.
325.El
326.Pp
327If the
328.Nm
329utility cannot determine the requested information, it prints
330.Dq Li unknown
331or
332.Dq Li generic .
333.It Fl l Ar level
334Specifies at which level
335.Nm
336should operate the mouse driver.
337Refer to
338.Sx Operation Levels
339in
340.Xr psm 4
341for more information on this.
342.It Fl m Ar N=M
343Assign the physical button
344.Ar M
345to the logical button
346.Ar N .
347You may specify as many instances of this option as you like.
348More than one physical button may be assigned to a logical button at the
349same time.
350In this case the logical button will be down,
351if either of the assigned physical buttons is held down.
352Do not put space around
353.Ql = .
354.It Fl p Ar port
355Use
356.Ar port
357to communicate with the mouse.
358.It Fl r Ar resolution
359Set the resolution of the device; in Dots Per Inch, or
360.Ar low ,
361.Ar medium-low ,
362.Ar medium-high
363or
364.Ar high .
365This option may not be supported by all the device.
366.It Fl s
367Select a baudrate of 9600 for the serial line.
368Not all serial mice support this option.
369.It Fl t Ar type
370Specify the protocol type of the mouse attached to the port.
371You may explicitly specify a type listed below, or use
372.Ar auto
373to let the
374.Nm
375utility automatically select an appropriate protocol for the given
376mouse.
377If you entirely omit this option in the command line,
378.Fl t Ar auto
379is assumed.
380Under normal circumstances,
381you need to use this option only if the
382.Nm
383utility is not able to detect the protocol automatically
384(see
385.Sx "Configuring Mouse Daemon" ) .
386.Pp
387Note that if a protocol type is specified with this option, the
388.Fl P
389option above is implied and Plug and Play COM device enumeration
390procedure will be disabled.
391.Pp
392Also note that if your mouse is attached to the PS/2 mouse port, you should
393always choose
394.Ar auto
395or
396.Ar ps/2 ,
397regardless of the brand and model of the mouse.
398Likewise, if your
399mouse is attached to the bus mouse port, choose
400.Ar auto
401or
402.Ar busmouse .
403Serial mouse protocols will not work with these mice.
404.Pp
405For the USB mouse, the protocol must be
406.Ar auto .
407No other protocol will work with the USB mouse.
408.Pp
409Valid types for this option are
410listed below.
411.Pp
412For the serial mouse:
413.Bl -tag -compact -width mousesystemsxxx
414.It Ar microsoft
415Microsoft serial mouse protocol.
416Most 2-button serial mice use this protocol.
417.It Ar intellimouse
418Microsoft IntelliMouse protocol.
419Genius NetMouse,
420.Tn ASCII
421Mie Mouse,
422Logitech MouseMan+ and FirstMouse+ use this protocol too.
423Other mice with a roller/wheel may be compatible with this protocol.
424.It Ar mousesystems
425MouseSystems 5-byte protocol.
4263-button mice may use this protocol.
427.It Ar mmseries
428MM Series mouse protocol.
429.It Ar logitech
430Logitech mouse protocol.
431Note that this is for old Logitech models.
432.Ar mouseman
433or
434.Ar intellimouse
435should be specified for newer models.
436.It Ar mouseman
437Logitech MouseMan and TrackMan protocol.
438Some 3-button mice may be compatible
439with this protocol.
440Note that MouseMan+ and FirstMouse+ use
441.Ar intellimouse
442protocol rather than this one.
443.It Ar glidepoint
444ALPS GlidePoint protocol.
445.It Ar thinkingmouse
446Kensington ThinkingMouse protocol.
447.It Ar mmhitab
448Hitachi tablet protocol.
449.It Ar x10mouseremote
450X10 MouseRemote.
451.It Ar kidspad
452Genius Kidspad and Easypad protocol.
453.It Ar versapad
454Interlink VersaPad protocol.
455.It Ar gtco_digipad
456GTCO Digipad protocol.
457.El
458.Pp
459For the bus and InPort mouse:
460.Bl -tag -compact -width mousesystemsxxx
461.It Ar busmouse
462This is the only protocol type available for
463the bus and InPort mouse and should be specified for any bus mice
464and InPort mice, regardless of the brand.
465.El
466.Pp
467For the PS/2 mouse:
468.Bl -tag -compact -width mousesystemsxxx
469.It Ar ps/2
470This is the only protocol type available for the PS/2 mouse
471and should be specified for any PS/2 mice, regardless of the brand.
472.El
473.Pp
474For the USB mouse,
475.Ar auto
476is the only protocol type available for the USB mouse
477and should be specified for any USB mice, regardless of the brand.
478.It Fl w Ar N
479Make the physical button
480.Ar N
481act as the wheel mode button.
482While this button is pressed, X and Y axis movement is reported to be zero
483and the Y axis movement is mapped to Z axis.
484You may further map the Z axis movement to virtual buttons by the
485.Fl z
486option below.
487.It Fl z Ar target
488Map Z axis (roller/wheel) movement to another axis or to virtual buttons.
489Valid
490.Ar target
491maybe:
492.Bl -tag -compact -width x__
493.It Ar x
494.It Ar y
495X or Y axis movement will be reported when the Z axis movement is detected.
496.It Ar N
497Report down events for the virtual buttons
498.Ar N
499and
500.Ar N+1
501respectively when negative and positive Z axis movement
502is detected.
503There do not need to be physical buttons
504.Ar N
505and
506.Ar N+1 .
507Note that mapping to logical buttons is carried out after mapping
508from the Z axis movement to the virtual buttons is done.
509.It Ar N1 N2
510Report down events for the virtual buttons
511.Ar N1
512and
513.Ar N2
514respectively when negative and positive Z axis movement
515is detected.
516.It Ar N1 N2 N3 N4
517This is useful for the mouse with two wheels of which
518the second wheel is used to generate horizontal scroll action,
519and for the mouse which has a knob or a stick which can detect
520the horizontal force applied by the user.
521.Pp
522The motion of the second wheel will be mapped to the buttons
523.Ar N3 ,
524for the negative direction, and
525.Ar N4 ,
526for the positive direction.
527If the buttons
528.Ar N3
529and
530.Ar N4
531actually exist in this mouse, their actions will not be detected.
532.Pp
533Note that horizontal movement or second roller/wheel movement may not
534always be detected,
535because there appears to be no accepted standard as to how it is encoded.
536.Pp
537Note also that some mice think left is the negative horizontal direction;
538others may think otherwise.
539Moreover, there are some mice whose two wheels are both mounted vertically,
540and the direction of the second vertical wheel does not match the
541first one.
542.El
543.El
544.Ss Configuring Mouse Daemon
545The first thing you need to know is the interface type
546of the mouse you are going to use.
547It can be determined by looking at the connector of the mouse.
548The serial mouse has a D-Sub female 9- or 25-pin connector.
549The bus and InPort mice have either a D-Sub male 9-pin connector
550or a round DIN 9-pin connector.
551The PS/2 mouse is equipped with a small, round DIN 6-pin connector.
552Some mice come with adapters with which the connector can
553be converted to another.
554If you are to use such an adapter,
555remember the connector at the very end of the mouse/adapter pair is
556what matters.
557The USB mouse has a flat rectangular connector.
558.Pp
559The next thing to decide is a port to use for the given interface.
560The PS/2 mouse is always at
561.Pa /dev/psm0 .
562There may be more than one serial port to which the serial
563mouse can be attached.
564Many people often assign the first, built-in
565serial port
566.Pa /dev/cuau0
567to the mouse.
568You can attach multiple USB mice to your system or to your USB hub.
569They are accessible as
570.Pa /dev/ums0 , /dev/ums1 ,
571and so on.
572.Pp
573You may want to create a symbolic link
574.Pa /dev/mouse
575pointing to the real port to which the mouse is connected, so that you
576can easily distinguish which is your
577.Dq mouse
578port later.
579.Pp
580The next step is to guess the appropriate protocol type for the mouse.
581The
582.Nm
583utility may be able to automatically determine the protocol type.
584Run the
585.Nm
586utility with the
587.Fl i
588option and see what it says.
589If the command can identify
590the protocol type, no further investigation is necessary on your part.
591You may start the daemon without explicitly specifying a protocol type
592(see
593.Sx EXAMPLES ) .
594.Pp
595The command may print
596.Ar sysmouse
597if the mouse driver supports this protocol type.
598.Pp
599Note that the
600.Dv type
601and
602.Dv model
603printed by the
604.Fl i
605option do not necessarily match the product name of the pointing device
606in question, but they may give the name of the device with which it is
607compatible.
608.Pp
609If the
610.Fl i
611option yields nothing, you need to specify a protocol type to the
612.Nm
613utility by the
614.Fl t
615option.
616You have to make a guess and try.
617There is rule of thumb:
618.Pp
619.Bl -enum -compact -width 1.X
620.It
621The bus and InPort mice always use
622.Ar busmouse
623protocol regardless of the brand of the mouse.
624.It
625The
626.Ar ps/2
627protocol should always be specified for the PS/2 mouse
628regardless of the brand of the mouse.
629.It
630You must specify the
631.Ar auto
632protocol for the USB mouse.
633.It
634Most 2-button serial mice support the
635.Ar microsoft
636protocol.
637.It
6383-button serial mice may work with the
639.Ar mousesystems
640protocol.
641If it does not, it may work with the
642.Ar microsoft
643protocol although
644the third (middle) button will not function.
6453-button serial mice may also work with the
646.Ar mouseman
647protocol under which the third button may function as expected.
648.It
6493-button serial mice may have a small switch to choose between
650.Dq MS
651and
652.Dq PC ,
653or
654.Dq 2
655and
656.Dq 3 .
657.Dq MS
658or
659.Dq 2
660usually mean the
661.Ar microsoft
662protocol.
663.Dq PC
664or
665.Dq 3
666will choose the
667.Ar mousesystems
668protocol.
669.It
670If the mouse has a roller or a wheel, it may be compatible with the
671.Ar intellimouse
672protocol.
673.El
674.Pp
675To test if the selected protocol type is correct for the given mouse,
676enable the mouse pointer in the current virtual console,
677.Pp
678.Dl "vidcontrol -m on"
679.Pp
680start the mouse daemon in the foreground mode,
681.Pp
682.Dl "moused -f -p <selected_port> -t <selected_protocol>"
683.Pp
684and see if the mouse pointer travels correctly
685according to the mouse movement.
686Then try cut & paste features by
687clicking the left, right and middle buttons.
688Type ^C to stop
689the command.
690.Ss Multiple Mice
691As many instances of the mouse daemon as the number of mice attached to
692the system may be run simultaneously; one
693instance for each mouse.
694This is useful if the user wants to use the built-in PS/2 pointing device
695of a laptop computer while on the road, but wants to use a serial
696mouse when s/he attaches the system to the docking station in the office.
697Run two mouse daemons and tell the application program
698(such as the
699.Tn "X\ Window System" )
700to use
701.Xr sysmouse 4 ,
702then the application program will always see mouse data from either mouse.
703When the serial mouse is not attached, the corresponding mouse daemon
704will not detect any movement or button state change and the application
705program will only see mouse data coming from the daemon for the
706PS/2 mouse.
707In contrast when both mice are attached and both of them
708are moved at the same time in this configuration,
709the mouse pointer will travel across the screen just as if movement of
710the mice is combined all together.
711.Sh FILES
712.Bl -tag -width /dev/consolectl -compact
713.It Pa /dev/consolectl
714device to control the console
715.It Pa /dev/psm%d
716PS/2 mouse driver
717.It Pa /dev/sysmouse
718virtualized mouse driver
719.It Pa /dev/ttyv%d
720virtual consoles
721.It Pa /dev/ums%d
722USB mouse driver
723.It Pa /var/run/moused.pid
724process id of the currently running
725.Nm
726utility
727.It Pa /var/run/MouseRemote
728UNIX-domain stream socket for X10 MouseRemote events
729.El
730.Sh EXAMPLES
731.Dl "moused -p /dev/cuau0 -i type"
732.Pp
733Let the
734.Nm
735utility determine the protocol type of the mouse at the serial port
736.Pa /dev/cuau0 .
737If successful, the command will print the type, otherwise it will say
738.Dq Li unknown .
739.Bd -literal -offset indent
740moused -p /dev/cuau0
741vidcontrol -m on
742.Ed
743.Pp
744If the
745.Nm
746utility is able to identify the protocol type of the mouse at the specified
747port automatically, you can start the daemon without the
748.Fl t
749option and enable the mouse pointer in the text console as above.
750.Bd -literal -offset indent
751moused -p /dev/mouse -t microsoft
752vidcontrol -m on
753.Ed
754.Pp
755Start the mouse daemon on the serial port
756.Pa /dev/mouse .
757The protocol type
758.Ar microsoft
759is explicitly specified by the
760.Fl t
761option.
762.Pp
763.Dl "moused -p /dev/mouse -m 1=3 -m 3=1"
764.Pp
765Assign the physical button 3 (right button) to the logical button 1
766(logical left) and the physical button 1 (left) to the logical
767button 3 (logical right).
768This will effectively swap the left and right buttons.
769.Pp
770.Dl "moused -p /dev/mouse -t intellimouse -z 4"
771.Pp
772Report negative Z axis movement (i.e., mouse wheel) as the button 4 pressed
773and positive Z axis movement (i.e., mouse wheel) as the button 5 pressed.
774.Pp
775If you add
776.Pp
777.Dl "ALL ALL = NOPASSWD: /usr/bin/killall -USR1 moused"
778.Pp
779to your
780.Pa /usr/local/etc/sudoers
781file, and bind
782.Pp
783.Dl "killall -USR1 moused"
784.Pp
785to a key in your window manager, you can suspend mouse events on your laptop if
786you keep brushing over the mouse pad while typing.
787.Sh SEE ALSO
788.Xr kill 1 ,
789.Xr vidcontrol 1 ,
790.Xr xset 1 ,
791.Xr keyboard 4 ,
792.Xr psm 4 ,
793.Xr screen 4 ,
794.Xr sysmouse 4 ,
795.Xr ums 4
796.Sh STANDARDS
797The
798.Nm
799utility partially supports
800.Dq Plug and Play External COM Device Specification
801in order to support PnP serial mice.
802However, due to various degrees of conformance to the specification by
803existing serial mice, it does not strictly follow the version 1.0 of the
804standard.
805Even with this less strict approach,
806it may not always determine an appropriate protocol type
807for the given serial mouse.
808.Sh HISTORY
809The
810.Nm
811utility first appeared in
812.Fx 2.2 .
813.Sh AUTHORS
814.An -nosplit
815The
816.Nm
817utility was written by
818.An Michael Smith Aq Mt msmith@FreeBSD.org .
819This manual page was written by
820.An Mike Pritchard Aq Mt mpp@FreeBSD.org .
821The command and manual page have since been updated by
822.An Kazutaka Yokota Aq Mt yokota@FreeBSD.org .
823.Sh CAVEATS
824Many pad devices behave as if the first (left) button were pressed if
825the user
826.Dq taps
827the surface of the pad.
828In contrast, some ALPS GlidePoint and Interlink VersaPad models
829treat the tapping action
830as fourth button events.
831Use the option
832.Dq Fl m Li 1=4
833for these models
834to obtain the same effect as the other pad devices.
835.Pp
836Cut and paste functions in the virtual console assume that there
837are three buttons on the mouse.
838The logical button 1 (logical left) selects a region of text in the
839console and copies it to the cut buffer.
840The logical button 3 (logical right) extends the selected region.
841The logical button 2 (logical middle) pastes the selected text
842at the text cursor position.
843If the mouse has only two buttons, the middle, `paste' button
844is not available.
845To obtain the paste function, use the
846.Fl 3
847option to emulate the middle button, or use the
848.Fl m
849option to assign the physical right button to the logical middle button:
850.Dq Fl m Li 2=3 .
851