Initial import from FreeBSD RELENG_4:
[dragonfly.git] / usr.sbin / pcvt / mcon / mcon.1
1 .\" Copyright (c) 1994 Joerg Wunsch
2 .\"
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\" 3. All advertising materials mentioning features or use of this software
14 .\"    must display the following acknowledgement:
15 .\"     This product includes software developed by Joerg Wunsch
16 .\" 4. The name authors may not be used to endorse or promote products
17 .\"    derived from this software without specific prior written permission.
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
20 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 .\" IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 .\"
30 .\" @(#)mcon.1, 3.00, Last Edit-Date: [Mon Jan 10 21:28:22 1994]
31 .\" $FreeBSD: src/usr.sbin/pcvt/mcon/mcon.1,v 1.8.2.1 2000/12/27 13:50:37 ru Exp $
32 .\"
33 .Dd January 3, 1994
34 .Dt MCON 1
35 .Os
36 .Sh NAME
37 .Nm mcon
38 .Nd controls pcvt mouse emulator
39 .Sh SYNOPSIS
40 .Nm
41 .Op Fl l Ar left-button-key
42 .Op Fl m Ar mid-button-key
43 .Op Fl r Ar right-button-key
44 .Op Fl a Ar accel-time
45 .Op Fl s Ar 0 | false | \&no
46 .Op Fl s Ar 1 | true | yes
47 .Ar device
48 .Sh DESCRIPTION
49 The
50 .Nm
51 utility controls the configurable parameters for the mouse emulator of
52 .Xr pcvt 4 .
53 .Pp
54 .Em NB :
55 The mouse emulator is not configured in by default; the system's config
56 file needs to specify an option line
57 .Pp
58 .Cd options PCVT_EMU_MOUSE
59 .Pp
60 in order to get its functionality.
61 .Pp
62 Either way, the
63 .Nm
64 program must be called with an argument
65 .Ar device
66 that specifies the device node used for the mouse emulation.
67 This is
68 usually the first device node of the
69 .Xr pcvt 4
70 driver not being used as a virtual terminal device.
71 E.\ g., if you
72 have configured eight virtual terminals
73 .Pq the default value ,
74 named
75 .Pa /dev/ttyv0
76 through
77 .Pa /dev/ttyv7 ,
78 the mouse emulator would allocate
79 .Pa /dev/ttyv8 .
80 .Pp
81 If
82 .Nm
83 is called without any option, it will print the actual values of the
84 configurable parameters.
85 .Pp
86 If called with an option, the program attempts to set up the new value.
87 .Pp
88 The options are as follows:
89 .Bl -tag -width Ds
90 .It Fl l Ar left-button-key
91 .It Fl m Ar mid-button-key
92 .It Fl r Ar right-button-key
93 Maps the named
94 .Ar button key
95 to emulate either the left, middle, or right mouse button.
96 .Ar Button key
97 is the usual name for that key.
98 Normal ASCII keys are denoted by the
99 character they're labeled with, function keys are named
100 .Em f1
101 through
102 .Em f10 .
103 Note that the AT function keys
104 .Em f11
105 and
106 .Em f12
107 are
108 .Em extended
109 keys that cannot be mapped to be used with the mouse emulator since
110 it only allows basic PC-scancode keys to be used.
111 .It Fl a Ar accel-time
112 Set the time limit for the internal accelerator to
113 .Ar accel-time
114 milliseconds.
115 Key events occurring after a longer time than this limit
116 will move the mouse cursor in single steps.
117 Key events arriving more
118 frequently will move the cursor accelerated by a factor of 6. Note that
119 despite of
120 .Em milliseconds
121 being the unit of choice here, the time resolution is restricted by the
122 timer tick distance of the underlying operating system, usually to a
123 granularity of 10 milliseconds.
124 .It Fl s Ar 0 | false | \&no
125 .It Fl s Ar 1 | true | yes
126 The first form disables, the second form enables the
127 .Em sticky
128 behaviour of the mouse buttons.
129 Sticky mouse keys behave much like
130 toggle-buttons: on first press, they become active, on second press,
131 they're deactivated.
132 Pressing another button will deactivate any
133 other sticky button anyway.
134 .Pp
135 Sticky buttons might be more convenient since you don't need 20 fingers
136 at all; on the other hand, they make it virtually impossible to initiate
137 double or triple mouse clicks.
138 .El
139 .Sh EXAMPLES
140 The following example would install the default behaviour of the
141 mouse emulator:
142 .Pp
143 .Nm
144 .Fl l Ar f1
145 .Fl m Ar f2
146 .Fl r Ar f3
147 .Fl a Ar 250
148 .Fl s Ar \&no
149 .Pa /dev/ttyv8
150 .Sh BUGS
151 The key names used to map the button-emulating keys to scan codes
152 .Pq and vica verse
153 are based on the American keyboard layout.
154 This would usually not
155 cause any trouble since the
156 .Dq button-of-choice
157 is certainly some function key that should be equal for any national
158 keyboard layout.
159 .Pp
160 The mouse emulator is a rude hack at all; its only purpose is to provide
161 a device to move the pointer within an X-windowing environment.
162 .Sh SEE ALSO
163 .Xr X 1 ,
164 .Xr pcvt 4
165 .Sh HISTORY
166 The
167 .Nm
168 utility appeared in
169 .Xr pcvt 4 ,
170 release 3.00.
171 .Sh AUTHORS
172 The mouse emulator has been contributed by
173 .An "J\(:org Wunsch" .