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