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
|
<table class="head">
<tr>
<td class="head-ltitle">UATP(4)</td>
<td class="head-vol">Device Drivers Manual</td>
<td class="head-rtitle">UATP(4)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">uatp</code> — <span class="Nd">USB Apple
trackpad driver</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="Cd">uatp* at uhidev? reportid ?</code>
<br/>
<code class="Cd">wsmouse* at uatp? mux 0</code></p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The <code class="Nm">uatp</code> driver provides support for the
USB trackpads found in Apple laptops since 2005, exposed through
<a class="Xr">wsmouse(4)</a>. Some USB Apple trackpads are standard USB HID
mice supported by <a class="Xr">ums(4)</a>, but <code class="Nm">uatp</code>
supports more features. The following <a class="Xr">sysctl(8)</a> variables
control behavior of USB Apple trackpads:</p>
<dl class="Bl-tag">
<dt id="hw.uatpN.two_finger_buttons"><a class="permalink" href="#hw.uatpN.two_finger_buttons"><code class="Dv">hw.uatpN.two_finger_buttons</code></a></dt>
<dd>Bit mask of buttons to emulate when two fingers are on the trackpad while
the button is pressed.</dd>
<dt id="hw.uatpN.three_finger_buttons"><a class="permalink" href="#hw.uatpN.three_finger_buttons"><code class="Dv">hw.uatpN.three_finger_buttons</code></a></dt>
<dd>Bit mask of buttons to emulate when three fingers are on the trackpad
while the button is pressed.</dd>
<dt id="hw.uatpN.multifinger_track"><a class="permalink" href="#hw.uatpN.multifinger_track"><code class="Dv">hw.uatpN.multifinger_track</code></a></dt>
<dd>What to do when multiple fingers are moved on the trackpad. If set to 0,
ignore the input. If set to 1, move as if a single finger were at the mean
position of the fingers. If set to 2, scroll. Note that scrolling is
currently broken.</dd>
<dt id="hw.uatpN.x_sensors"><a class="permalink" href="#hw.uatpN.x_sensors"><code class="Dv">hw.uatpN.x_sensors</code></a></dt>
<dd>Number of sensor columns detecting the x positions of fingers on the
trackpad. The driver should detect this based on the model of hardware, so
you should not have to set this, and likewise for the x ratio and y
sensors and ratio.</dd>
<dt id="hw.uatpN.x_ratio"><a class="permalink" href="#hw.uatpN.x_ratio"><code class="Dv">hw.uatpN.x_ratio</code></a></dt>
<dd>Ratio of the number of sensor columns in the trackpad to the number of
distinct cursor x positions.</dd>
<dt id="hw.uatpN.y_sensors"><a class="permalink" href="#hw.uatpN.y_sensors"><code class="Dv">hw.uatpN.y_sensors</code></a></dt>
<dd>Number of sensor rows detecting the y positions of fingers on the
trackpad.</dd>
<dt id="hw.uatpN.y_ratio"><a class="permalink" href="#hw.uatpN.y_ratio"><code class="Dv">hw.uatpN.y_ratio</code></a></dt>
<dd>Ratio of the number of sensor rows in the trackpad to the number of
distinct cursor y positions.</dd>
<dt id="hw.uatpN.sensor_threshold"><a class="permalink" href="#hw.uatpN.sensor_threshold"><code class="Dv">hw.uatpN.sensor_threshold</code></a></dt>
<dd>Nonnegative integer giving a lower bound on the “pressure” a
sensor must report for the driver to recognize input from it.</dd>
<dt id="hw.uatpN.sensor_normalizer"><a class="permalink" href="#hw.uatpN.sensor_normalizer"><code class="Dv">hw.uatpN.sensor_normalizer</code></a></dt>
<dd>Nonnegative integer to subtract from the “pressure” reported
by a sensor when averaging them to estimate the pressure of a single
finger.</dd>
<dt id="hw.uatpN.palm_width"><a class="permalink" href="#hw.uatpN.palm_width"><code class="Dv">hw.uatpN.palm_width</code></a></dt>
<dd>If zero, palm detection is disabled. Otherwise, a positive integer giving
the number of consecutive sensors wide or high that will be interpreted as
a palm instead of a finger and therefore ignored.</dd>
<dt id="hw.uatpN.old_raw_weight"><a class="permalink" href="#hw.uatpN.old_raw_weight"><code class="Dv">hw.uatpN.old_raw_weight</code></a></dt>
<dd style="width: auto;"> </dd>
<dt id="hw.uatpN.old_smoothed_weight"><a class="permalink" href="#hw.uatpN.old_smoothed_weight"><code class="Dv">hw.uatpN.old_smoothed_weight</code></a></dt>
<dd style="width: auto;"> </dd>
<dt id="hw.uatpN.new_raw_weight"><a class="permalink" href="#hw.uatpN.new_raw_weight"><code class="Dv">hw.uatpN.new_raw_weight</code></a></dt>
<dd>When a finger moves on the trackpad, the new smoothed (cursor) position is
computed as a positive linear combination of the old raw (trackpad)
position, the old smoothed position, and the new raw position. The weights
of the linear combination are given by these sysctl knobs.</dd>
<dt id="hw.uatpN.motion_threshold"><a class="permalink" href="#hw.uatpN.motion_threshold"><code class="Dv">hw.uatpN.motion_threshold</code></a></dt>
<dd>Threshold below which a difference in smoothed position will not be
reported as an input event to userland.</dd>
<dt id="hw.uatpN.motion_multiplier"><a class="permalink" href="#hw.uatpN.motion_multiplier"><code class="Dv">hw.uatpN.motion_multiplier</code></a></dt>
<dd>Positive integer by which a difference in smoothed position will be
multiplied before passing it as an input event to userland.</dd>
<dt id="hw.uatpN.motion_divisor"><a class="permalink" href="#hw.uatpN.motion_divisor"><code class="Dv">hw.uatpN.motion_divisor</code></a></dt>
<dd>Positive integer by which a difference in smoothed position will be
divided, after multiplying it by the motion multiplier, before passing it
as an input event to userland.</dd>
<dt id="hw.uatpN.fast_motion_threshold"><a class="permalink" href="#hw.uatpN.fast_motion_threshold"><code class="Dv">hw.uatpN.fast_motion_threshold</code></a></dt>
<dd>Threshold above which to use the fast motion factors below.</dd>
<dt id="hw.uatpN.fast_motion_multiplier"><a class="permalink" href="#hw.uatpN.fast_motion_multiplier"><code class="Dv">hw.uatpN.fast_motion_multiplier</code></a></dt>
<dd>Positive integer by which to multiply a large difference in smoothed
position.</dd>
<dt id="hw.uatpN.fast_motion_divisor"><a class="permalink" href="#hw.uatpN.fast_motion_divisor"><code class="Dv">hw.uatpN.fast_motion_divisor</code></a></dt>
<dd>Positive integer by which to divide a large difference in smoothed
position, after multiplying it by the fast motion multiplier.</dd>
<dt id="hw.uatpN.motion_delay"><a class="permalink" href="#hw.uatpN.motion_delay"><code class="Dv">hw.uatpN.motion_delay</code></a></dt>
<dd>Number of input packets before <code class="Nm">uatp</code> reports motion
to userland.</dd>
<dt id="hw.uatpN.tap_limit_msec"><a class="permalink" href="#hw.uatpN.tap_limit_msec"><code class="Dv">hw.uatpN.tap_limit_msec</code></a></dt>
<dd>Positive integer giving the number of milliseconds of a finger's contact
with the trackpad before it will not be considered a tap.</dd>
<dt id="hw.uatpN.double_tap_limit_msec"><a class="permalink" href="#hw.uatpN.double_tap_limit_msec"><code class="Dv">hw.uatpN.double_tap_limit_msec</code></a></dt>
<dd>Positive integer giving the maximum number of milliseconds after a tap
before a second tap will keep the button down.</dd>
<dt id="hw.uatpN.one_finger_tap_buttons"><a class="permalink" href="#hw.uatpN.one_finger_tap_buttons"><code class="Dv">hw.uatpN.one_finger_tap_buttons</code></a></dt>
<dd>Bit mask of buttons that a one-finger tap will press.</dd>
<dt id="hw.uatpN.two_finger_tap_buttons"><a class="permalink" href="#hw.uatpN.two_finger_tap_buttons"><code class="Dv">hw.uatpN.two_finger_tap_buttons</code></a></dt>
<dd>Bit mask of buttons that a two-finger tap will press.</dd>
<dt id="hw.uatpN.three_finger_tap_buttons"><a class="permalink" href="#hw.uatpN.three_finger_tap_buttons"><code class="Dv">hw.uatpN.three_finger_tap_buttons</code></a></dt>
<dd>Bit mask of buttons that a three-finger tap will press.</dd>
<dt id="hw.uatpN.tap_track_distance_limit"><a class="permalink" href="#hw.uatpN.tap_track_distance_limit"><code class="Dv">hw.uatpN.tap_track_distance_limit</code></a></dt>
<dd>Maximum distance in smoothed position that will be interpreted as a tap
instead of motion.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<p class="Pp"><a class="Xr">ums(4)</a>, <a class="Xr">wsmouse(4)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<p class="Pp">The <code class="Nm">uatp</code> driver first appeared in
<span class="Ux">NetBSD 7.0</span>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">The <code class="Nm">uatp</code> driver was originally written by
<span class="An">Taylor R. Campbell</span>
<<a class="Mt" href="mailto:riastradh@NetBSD.org">riastradh@NetBSD.org</a>>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1>
<p class="Pp">Sometimes, particularly when X starts up, the driver gets wedged
in an interrupt storm and does not reset the device. Setting
<code class="Li">hw.uatpN.sensor_threshold</code> to a large number, say
1000, and then back to its original value, can fix this.</p>
<p class="Pp">Palm detection is not very robust.</p>
<p class="Pp">Multi-touch scrolling is currently broken.</p>
<p class="Pp">Pinch-to-zoom and other fancy multi-touch input is not
implemented.</p>
<p class="Pp">On suspending and resuming, <code class="Nm">uatp</code> detaches
and reattaches, and loses all sysctl settings in the process.</p>
<p class="Pp">Do not submerge your <code class="Nm">uatp</code> devices in
water: USB adenosine triphosphate is unstable in water, and will hydrolyze
to USB adenosine diphosphate and phosphate, which is a lower energy state
that makes your mouse narcoleptic in X.</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">August 4, 2012</td>
<td class="foot-os">NetBSD 10.1</td>
</tr>
</table>
|