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
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
|
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Copyright (c) 2025 Vladimir Kondratyev <wulf@FreeBSD.org>
.\"
.\" 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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 May 19, 2025
.Dt MOUSED.CONF 5
.Os
.Sh NAME
.Nm moused.conf
.Nd mouse daemon configuration file
.Sh DESCRIPTION
The
.Nm
file specifies how the
.Xr moused 8
(mouse daemon) should operate. It provides ability to adjust certain
mice parameters on per-device basis.
.Pp
Configuration file format is derived from
.Xr libinput 1
device quirk files.
A file may contain multiple section headers ([some identifier])
followed by one or more MatchFoo=Bar directives, followed by at least
one of MousedFoo=bar or AttrFoo=bar directive.
A configuration file must contain at least one section, each section
must have at least one
.Sq Match
tag and at least one of either
.Sq Attr
or
.Sq Moused .
Section names are free-form and may contain spaces.
.Ss List of currently available matches.
.Bl -tag -width indent
.It MatchName, MatchUniq
Match on the NAME or UNIQ udev property on this device. These
properties are typically derived from the device’s kernel name or uniq.
These matches use
.Fn fnmatch
globs.
.It MatchBus
A lower-case bus name. Currently supported are usb, bluetooth, ps2,
rmi, i2c, and spi.
.It MatchVendor, MatchProduct, MatchVersion
The hexadecmial 4-digit vendor ID, product ID or driver version as
exported, without a 0x prefix.
.It MatchDMIModalias, MatchDeviceTree
An
.Fn fnmatch
glob for the DMI modalias or the DeviceTree compatible string.
.It MatchDevType
One of touchpad, mouse, pointingstick, keyboard, joystick, tablet,
tablet-pad.
Only touchpad and mouse types are supported.
.El
.Ss List of currently available Moused tags.
.Bl -tag -width indent
.It MousedGrabDevice
Only for evdev interface.
Become the sole recipient of all incoming input events.
This prevents other processes from getting input events on the device.
.Pp
Use
.Fl g
option alternatively.
.It MousedIgnoreDevice
Ignore given device.
.It MousedClickThreshold
Set double click speed as the maximum interval in msec between button clicks.
Without this option, 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.
The user program which is reading mouse data
via
.Xr sysmouse 4
will not be affected.
.Pp
Use
.Fl C
option alternatively.
.It MousedEmulateThirdButton
Emulate the third (middle) button for 2-button mice.
It is emulated
by pressing the left and right physical buttons simultaneously.
.Pp
Use
.Fl 3
option alternatively.
.It MousedEmulateThirdButtonTimeout
When the third button emulation is enabled
(see above),
the
.Xr moused 8
utility waits
.Ar MousedEmulateThirdButtonTimeout
msec at most before deciding whether two buttons are being pressed
simultaneously.
The default timeout is 100 msec.
.Pp
Use
.Fl E
option alternatively.
.It MousedLinearAccelX
.It MousedLinearAccelY
.It MousedLinearAccelZ
Accelerate or decelerate the mouse input.
This is a linear acceleration only.
Values less than 1.0 slow down movement, values greater than 1.0 speed it
up.
.Pp
You can use the
.Ar MousedLinearAccel
and
.Ar MousedExponentialAccel
options at the same time to have the combined effect
of linear and exponential acceleration.
.Pp
Use
.Fl a
option alternatively.
.It MousedExponentialAccel
.It MousedExponentialOffset
Apply exponential (dynamic) acceleration to mouse movements:
the faster you move the mouse, the more it will be accelerated.
That means that small mouse movements are not accelerated,
so they are still very accurate, while a faster movement will
drive the pointer quickly across the screen.
.Pp
The
.Ar MousedExponentialAccel
value specifies the exponent, which is basically
the amount of acceleration. Useful values are in the
range 1.1 to 2.0, but it depends on your mouse hardware
and your personal preference. A value of 1.0 means no
exponential acceleration. A value of 2.0 means squared
acceleration (i.e. if you move the mouse twice as fast,
the pointer will move four times as fast on the screen).
Values beyond 2.0 are possible but not recommended.
A good value to start is probably 1.5.
.Pp
The optional
.Ar MousedExponentialOffset
value specifies the distance at which the acceleration
begins. The default is 1.0, which means that the
acceleration is applied to movements larger than one unit.
If you specify a larger value, it takes more speed for
the acceleration to kick in, i.e. the speed range for
small and accurate movements is wider.
Usually the default should be sufficient, but if you're
not satisfied with the behaviour, try a value of 2.0.
.Pp
Note that the
.Fl A
option interacts badly with the X server's own acceleration,
which doesn't work very well anyway. Therefore it is
recommended to switch it off if necessary:
.Dq xset m 1 .
.Pp
Use
.Fl A
option alternatively.
.It MousedMapZAxis
Map Z axis (roller/wheel) movement to another axis or to virtual buttons.
Does not supported yet.
Use
.Fl z
option instead.
.It MousedVirtualScrollEnable
Enable
.Dq Virtual Scrolling .
With this option set, holding the middle mouse
button down will cause motion to be interpreted as scrolling.
Use the
.Ar MousedVirtualScrollThreshold
option to set the distance the mouse must move before the scrolling mode is
activated and the
.Ar MousedVirtualScrollSpeed
option to set the scrolling speed.
.Pp
Use
.Fl V
option alternatively.
.It MousedHorVirtualScrollEnable
Enable
.Dq Horizontal Virtual Scrolling .
With this option set, holding the middle mouse
button down will cause motion to be interpreted as
horizontal scrolling.
Use the
.Ar MousedVirtualScrollThreshold
option to set the distance the mouse must move before the scrolling mode is
activated and the
.Ar MousedVirtualScrollSpeed
option to set the scrolling speed.
This option may be used with or without the
.Ar MousedVirtualScrollEnable
option.
.Pp
Use
.Fl H
option alternatively.
.It MousedVirtualScrollSpeed= Ar distance
When
.Dq Virtual Scrolling
is enabled, the
.Ar MousedVirtualScrollSpeed
option can be used to set the
.Ar distance
(in pixels) that the mouse must move before a scroll event
is generated.
This effectively controls the scrolling speed.
The default
.Ar distance
is 2 pixels.
.Pp
Use
.Fl L
option alternatively.
.It MousedVirtualScrollThreshold= Ar distance
When
.Dq Virtual Scrolling
is enabled, the
.Ar MousedVirtualScrollThreshold
option can be used to set the
.Ar distance
(in pixels) that the mouse must move before the scrolling
mode is activated.
The default
.Ar distance
is 3 pixels.
.Pp
Use
.Fl U
option alternatively.
.It MousedWMode= 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
.Ar MousedMapZAxis
tag.
.Pp
Use
.Fl w
option alternatively.
.El
.Ss List of currently available Moused mice specific tags.
.Bl -tag -width indent
.It MousedDriftTerminate
.It MousedDriftDistance
.It MousedDriftTime
.It MousedDriftAfter
Terminate drift.
Use this option if mouse pointer slowly wanders when mouse is not moved.
Movements up to
.Ar MousedDriftDistance
(for example 4) pixels (X+Y) in
.Ar MousedDriftTime
msec (default 500) are ignored, except during
.Ar MousedDriftAfter
msec (default 4000) since last real mouse movement.
.Pp
Use
.Fl T
option alternatively.
.El
.Ss List of currently available Moused touchpad specific tags.
.Bl -tag -width indent
.It MousedTwoFingerScroll
Enable two finger scrolling.
.It MousedNaturalScroll
Enable natural scrolling.
.It MousedThreeFingerDrag
Enable dragging with three fingers.
.It MousedSoftButton2X
Horizontal position of 2-nd softbutton left edge in percents.
(0-disable)
.It MousedSoftButton3X
Horizontal position of 3-rd softbutton left edge in percents.
(0-disable)
.It MousedSoftButtonsY
Vertical size of softbuttons area in percents.
Use negative values to place softbutton area at top of touchpad.
.It MousedTapTimeout
Tap timeout in milliseconds
.It MousedTapPressureThreshold
Pressure threshold to detect tap.
.It MousedTapMaxDelta
Length of finger movement above which a tap is ignored measured in mm.
.It MousedTapholdTimeout
Maximum elapsed time between two taps to consider a tap-hold action.
.It MousedVScrollMinDelta
Minimum movement to consider virtual scrolling.
.It MousedVScrollHorArea
Area reserved for horizontal virtual scrolling in mm.
.It MousedVScrollVerArea
Area reserved for vertical virtual scrolling in mm.
.El
.Ss List of currently available libinput-compatible tags.
.Bl -tag -width indent
.It AttrSizeHint
Hints at the width x height of the device in mm.
.It AttrTouchSizeRange
Not supported yet.
.It AttrPalmSizeThreshold
Maximum finger width to detect palm in mm.
.It AttrLidSwitchReliability
Not supported yet.
.It AttrKeyboardIntegration
Not supported yet.
.It AttrPointingStickIntegration
Not supported yet.
.It AttrTPKComboLayout
Not supported yet.
.It AttrPressureRange= Ar N : Ar M
Specifies the touch pressure required to trigger a press
.Ar N
and to trigger a release
.Ar M .
.It AttrPalmPressureThreshold
Maximum pressure to detect palm.
.It AttrResolutionHint
Hints at the resolution of the x/y axis in units/mm.
.It AttrTrackpointMultiplier
Not supported yet.
.It AttrThumbPressureThreshold
Not supported yet.
.It AttrUseVelocityAveraging
Not supported yet.
.It AttrTabletSmoothing
Not supported yet.
.It AttrThumbSizeThreshold
Not supported yet.
.It AttrMscTimestamp
Not supported yet.
.It AttrEventCode
Enables or disables the evdev event type/code tuples on the device.
The prefix for each entry is either
.Sq +
(enable) or
.Sq -
(disable).
Entries may be a named event type, or a named event code, or a named
event type with a hexadecimal event code, separated by a single colon.
.It AttrInputProp
Enables or disables the evdev input property on the device.
The prefix for each entry is either
,Sq +
(enable) or
.Sq -
(disable).
Entries may be a named input property or the hexadecimal value of that
property.
.El
.Pp
All
.Xr libinput 1
.Sq Model
quirks are currently ignored.
.Sh FILES
.Bl -tag -width /usr/local/etc/moused.conf -compact
.It Pa /usr/local/etc/moused.conf
The file
.Nm
resides in
.Pa /usr/local/etc .
.It Pa /usr/local/share/moused/*.quirks
Predefined quirks processed before
.Nm .
.El
.Sh EXAMPLES
Set touch pressure and palm detection thresholds for PS/2 Synaptics
touchpad:
.Bd -literal -offset indent
[SynPS/2 Synaptics TouchPad]
MatchDevType=touchpad
MatchName=SynPS/2 Synaptics TouchPad
AttrPressureRange=35:30
AttrPalmPressureThreshold=220
.Ed
.Sh SEE ALSO
.Xr moused 8
.Pp
.Xr libinput 1
device quirk format:
.Lk https://wayland.freedesktop.org/libinput/doc/latest/device-quirks.html
.Sh HISTORY
The
.Nm
file format first appeared in
.Fx 15.0 .
.Sh AUTHORS
This manual page was written by
.An Vladimir Kondratyev Aq Mt wulf@FreeBSD.org
based on
. Xr moused 8
manual page and
.Xr libinput 1
documentation.
|