summaryrefslogtreecommitdiff
path: root/usr.sbin/moused/moused.8
blob: bf404d4b10c5419740ab1a4a265f2b2da5584925 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
.\"	$OpenBSD: moused.8,v 1.4 2000/10/30 18:48:02 aaron Exp $
.\"
.Dd August 30, 2000
.Dt MOUSED 8 i386
.Os
.Sh NAME
.Nm moused
.Nd
mouse daemon
.Sh SYNOPSIS
.Nm moused
.Op Fl 3DPRcdfs
.Op Fl I Ar pid_file
.Op Fl F Ar rate
.Op Fl r Ar resolution
.Op Fl S Ar baudrate
.Op Fl C Ar threshold
.Op Fl t Ar protocol
.Op Fl m Ar mousetype
.Op Fl M Ar N=M
.Op Fl w Ar N
.Op Fl z Ar target
.Op Fl b Ar buttons
.Ar -p Ar device
.Nm moused
.Ar -i Ar info
.Ar -p Ar device
.Sh DESCRIPTION
.Nm
listens for mouse events on the specified
.Ar device
and communicates them to the
.Xr pcvt 4
driver through the
.Pa /dev/pcvtctl
interface.
Its purpose is to provide copy/paste functionality on the PC console.
.Pp
By default, the left mouse button is used to select text (in the familiar
click-and-drag fashion), the right button is used to extend the selection,
and the middle button pastes.
This behavior can be modified through the use of
.Fl M ,
i.e.,
.Fl M
.Ar 2=3
maps the right mouse button to paste.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl 3
Emulate the third (middle) button for 2-button mice.
It is emulated by pressing the left and right physical buttons simultaneously.
.It Fl C
Set double click speed as the maximum interval in msec between button clicks.
If omitted, the default value of 500 msec will be assumed.
This option will have effect only on the cut and paste operations
in the text mode console.
.It Fl D
Lower DTR on the serial port.
This option is valid only if
.Em mousesystems
is selected as the protocol type.
The DTR line may need to be dropped for a 3-button mouse to operate in the
.Em mousesystems
mode.
.It Fl F Ar rate
Set the report rate (reports/sec) of the device, if supported.
.It Fl I Ar file
Write the process ID of
.Nm
to the specified
.Ar file .
If omitted, the process ID will be stored in
.Pa /var/run/moused.pid .
.It Fl P
Do not start the Plug and Play COM device enumeration procedure when identifying
the serial mouse.
If this option is given together with the
.Fl i
option,
.Nm
won't be able to print useful information for the serial mouse.
.It Fl R
Lower RTS on the serial port.
This option is valid only if
.Em mousesystems
is selected as the protocol type by the
.Fl t
option below.
It is often used with the
.Fl D
option above.
Both the RTS and DTR lines may need to be dropped for a
3-button mouse to operate in the
.Em mousesystems
mode.
is selected as the protocol type by the
.Em mousesystems
mode.
.It Fl S Ar baudrate
Select the baudrate for the serial port (1200 to 9600). Not all serial mice
support this option.
.It Fl c
Some mice report middle button down events as if the left and right buttons are
pressed.
This option handles this.
.It Fl d
Enable debugging messages.
.It Fl f
Do not become a daemon and instead run as a foreground process.
Useful for testing and debugging.
.It Fl i Ar info
Print specified information and quit.
Available pieces of information are:
.Bl -tag -width model
.It port
Device name, i.e.,
.Pa /dev/cua0[0-3]
for a serial mouse,
.Pa /dev/lms0
for a logitech-style bus mouse,
.Pa /dev/mms0
for a microsoft-style bus mouse and
.Pa /dev/psm0
for a PS/2 mouse.
.It if
Physical interface: serial, bus, inport, or PS/2.
.It type
Protocol type: one of the types supported by the
.Fl t
option.
.It model
Mouse model.
.Nm
may not always be able to identify the model.
.It all
All of the above options.
Print device name, physical interface, type, and model in this order, on
a single line.
.El
.It Fl m Ar mousetype
Precise the model of the mouse.
For example,
.Em intellimouse
can be specified for a PS/2 mouse with a wheel.
.It Fl M Ar N=M
Assign the physical button
.Em N
to the logical button
.Em M .
You may specify as many instances of this option as you like.
More than one
physical button may be assigned to a logical button at the same time.
In this case the logical button will be down, if either of the assigned
physical buttons is held down.
Do not put space around
.Ql = .
.It Fl w Ar N
Make the physical button
.Ar N
act as the wheel mode button.
While this button is pressed, X and Y axis movement is reported to be zero
and the Y axis movement is mapped to Z axis.
You may further map the Z axis movement to virtual buttons by the
.Fl z
option below.
.It Fl z Ar target
Map Z axis (roller/wheel) movement to another axis or to virtual buttons.
Valid
.Ar targets
are:
.Bl -tag -width x___
.It Ar x , Ar y
X or Y axis movement will be reported when Z axis movement is detected.
.It Ar N
Report the virtual buttons
.Ar N
and
.Ar N+1
down events respectively when negative and positive Z axis movement
is detected.
There doesn't need to be physical buttons
.Ar N
and
.Ar N+1 .
Note that mapping to logical buttons is carried out after mapping
from the Z axis movement to the virtual buttons is done.
.El
.It Fl p Ar port
Use the device
.Em port
to communicate with the mouse.
.Em port
must be one of
.Pa /dev/cua0[0-3]
for a serial mouse,
.Pa /dev/lms0
for a logitech-bus style mouse,
.Pa /dev/mms0
for a microsoft-bus style mouse or
.Pa /dev/psm0
for a PS/2 mouse.
.It Fl r Ar resolution
Set the resolution of the device; in Dots Per Inch, or
.Em low ,
.Em medium-low ,
.Em medium-high ,
or
.Em high .
This option may not be supported by all the devices.
.It Fl s
Select a baudrate of 9600 for the serial line.
Not all serial mice support this option.
.It Fl t Ar type
Specify the protocol type of the mouse attached to the port.
You may explicitly specify a type listed below or use
.Em auto
to let
.Nm
to automatically select an appropriate protocol for the given mouse.
If this option is not specified,
.Em auto
is assumed.
Under normal circumstances, you need to use this option only if
.Nm
is unable to detect the protocol automatically.
.Pp
Note that if a protocol type is specified with this option, the
.Fl P
option above is implied and Plug and Play COM device enumeration procedure
will be disabled.
.Pp
Also note that if your mouse is attached to the PS/2 mouse port,
you should always choose
.Em auto
or
.Em ps/2 ,
regardless of the brand and model of the mouse.
Likewise, if your mouse is attached to the bus mouse port, choose
.Em auto
or
.Em busmouse .
Serial mouse protocols will not work with these mice.
.Pp
Valid protocol types for this option are the following:
.Pp
For serial mice:
.Bl -tag -width thinkingmouse
.It microsoft
Microsoft serial mouse protocol.
Most 2-button serial mice use this protocol.
.It intellimouse
Microsoft IntelliMouse protocol.
Genius NetMouse, ASCII Mie Mouse, Logitech MouseMan+, and FirstMouse+ use
use this protocol as well.
Other mice with a roller/wheel may be compatible with this protocol.
.It mousesystems
MouseSystems 5-byte protocol.
3-button mice may use this protocol.
.It mmseries
MM Series mouse protocol.
.It logitech
Logitech mouse protocol.
Note that this is for old Logitech models
.Em mouseman
or
.Em intellimouse
should be specified for newer models.
.It mouseman
Logitech MouseMan and TrackMan protocol.
Some 3-button mice may be compatible with this protoco.
Note that MouseMan+ and FirstMouse+ use
.Em intellimouse
protocol rather than this one.
.It glidepoint
ALPS GlidePoint protocol.
.It thinkingmouse
Kensington ThinkingMouse protocol.
.It mmhitab
Hitachi tablet protocol.
.El
.Pp
For the Logitech-style and Microsoft-style bus mice:
.Bl -tag -indent -width thinkingmouse
.It busmouse
This is the only protocol type available for the bus style
mice and should be specified for any bus style mice, regardless of the brand.
.El
.Pp
For the PS/2 mouse:
.Bl -tag -indent -width thinkingmouse
.It ps/2
This is the only protocol type available for the PS/2 mouse and
should be specified for any PS/2 mice, regardless of the brand.
.Sh SEE ALSO
.Xr pcvt 4
.Sh HISTORY
The
.Nm
daemon is a slightly modified version of the moused daemon from the
FreeBSD project, written by Michael Smith <msmith@FreeBSD.org>.
Both inherit code from the XFree Project.