summaryrefslogtreecommitdiff
path: root/usr.sbin/wsmoused/wsmoused.8
blob: 770e332c03fb93939babf618090ffd823ee1536c (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
.\"	$OpenBSD: wsmoused.8,v 1.20 2015/10/26 09:58:18 deraadt Exp $
.\"
.\" Copyright (c) 2001 Jean-Baptiste Marchand
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: October 26 2015 $
.Dt WSMOUSED 8 i386
.Os
.Sh NAME
.Nm wsmoused
.Nd wsmouse daemon
.Sh SYNOPSIS
.Nm wsmoused
.Op Fl 2dfi
.Op Fl C Ar thresh
.Op Fl D Ar device
.Oo
.Fl M
.Ar N Ns = Ns Ar M
.Oc
.Op Fl p Ar device
.Op Fl t Ar type
.Sh DESCRIPTION
.Nm
listens for mouse events on the specified
.Ar device
and communicates them to the
.Xr wscons 4
driver.
Its purpose is to provide copy/paste functionality on the 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 ,
e.g.\&
.Li -M 2=3
maps the right mouse button to paste.
.Pp
The options are as follows:
.Bl -tag -width "-p device"
.It Fl 2
Indicate that the mouse has two buttons.
In that case, the right button pastes.
.It Fl C Ar thresh
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 Ar device
Use
.Ar device
as the display control device.
If omitted,
.Nm
will use the default value of
.Pa /dev/ttyCcfg ,
which controls the
.Nm wsdisplay0
display terminals.
.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
Print the type and the protocol of the mouse and exit.
.It Fl M Ar N Ns = Ns Ar M
Assign the physical button
.Ar M
to the logical button
.Ar N .
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 = .
Button numbers start from one, assigned to the leftmost button.
.It Fl p Ar device
Use
.Ar device
to communicate with the mouse.
If this option is not present, the device opened is
.Pa /dev/wsmouse
(the multiplexer device that receives all mouse events from all wsmouse
compatible mice on the system).
For a serial mouse, you have to explicitly specify the serial port, i.e.\&
.Ar device
must be one of
.Pa /dev/cua0[0-3] .
.It Fl t Ar type
This option only applies to serial mice.
It specifies the protocol used by the serial mice.
You may explicitly specify a type listed below or use
.Em auto
to let
.Nm
automatically select an appropriate protocol for the given mouse, if the
serial mouse respects the PnP COM specification.
.Pp
If this option is not specified,
.Em auto
is assumed.
Under normal circumstances, you need to use this option only if
the mouse is not PnP compatible.
.Pp
Valid protocol types for this option are the following:
.Bl -tag -width thinkingmouse
.It Ar microsoft
Microsoft serial mouse protocol.
Most 2-button serial mice use this protocol.
.It Ar intellimouse
Microsoft IntelliMouse protocol.
Genius NetMouse, ASCII Mie Mouse, Logitech MouseMan+, and FirstMouse+
use this protocol as well.
Other mice with a roller/wheel may be compatible with this protocol.
.It Ar mousesystems
MouseSystems 5-byte protocol.
3-button mice may use this protocol.
.It Ar mmseries
MM Series mouse protocol.
.It Ar logitech
Logitech mouse protocol.
Note that this is for old Logitech models.
.Ar mouseman
or
.Ar intellimouse
should be specified for newer models.
.It Ar mouseman
Logitech MouseMan and TrackMan protocol.
Some 3-button mice may be compatible with this protocol.
Note that MouseMan+ and FirstMouse+ use
.Ar intellimouse
protocol rather than this one.
.It Ar glidepoint
ALPS GlidePoint protocol.
.It Ar thinkingmouse
Kensington ThinkingMouse protocol.
.It Ar mmhitab
Hitachi tablet protocol.
.El
.El
.Pp
.Nm
will happily coexist with the X Window System, provided that the mouse
device is supported by
.Xr wsmouse 4 .
Serial mice do not have a
.Xr wsmouse 4
compatible driver, so
.Nm
has to be killed before starting the X Window System.
.Sh EXAMPLES
To start wsmoused on the
.Nm wsdisplay1
display terminals, using a two-button serial mouse connected to
.Pa /dev/cua0 :
.Pp
.Dl # wsmoused -2 -D /dev/ttyDcfg -p /dev/cua0
.Pp
To start wsmoused on the
.Nm wsdisplay0
display terminals, using
.Pa /dev/wsmouse
with the left and right buttons swapped
.Pq assuming a three button mouse :
.Pp
.Dl # wsmoused -M 1=3 -M 3=1
.Sh SEE ALSO
.Xr wscons 4 ,
.Xr wsmouse 4
.Sh HISTORY
The
.Nm
daemon is a slightly modified version of the moused daemon from the
.Fx
project, written by
.An Michael Smith Aq Mt msmith@FreeBSD.org .
Both inherit code from the XFree Project.