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