xref: /netbsd/share/man/man4/uatp.4 (revision 2adb3a73)
1.\" $NetBSD: uatp.4,v 1.4 2014/03/18 18:20:39 riastradh Exp $
2.\"
3.\" Copyright (c) 2012 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Taylor R. Campbell.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd August 4, 2012
31.Dt UATP 4
32.Os
33.Sh NAME
34.Nm uatp
35.Nd USB Apple trackpad driver
36.Sh SYNOPSIS
37.Cd "uatp* at uhidev? reportid ?"
38.Cd "wsmouse* at uatp? mux 0"
39.Sh DESCRIPTION
40The
41.Nm
42driver provides support for the USB trackpads found in Apple laptops
43since 2005, exposed through
44.Xr wsmouse 4 .
45Some USB Apple trackpads are standard USB HID mice supported by
46.Xr ums 4 ,
47but
48.Nm
49supports more features.
50The following
51.Xr sysctl 8
52variables control behavior of USB Apple trackpads:
53.Bl -tag -width hw.uatpN.tap_track_distance_limit
54.It Dv hw.uatpN.two_finger_buttons
55Bit mask of buttons to emulate when two fingers are on the trackpad
56while the button is pressed.
57.It Dv hw.uatpN.three_finger_buttons
58Bit mask of buttons to emulate when three fingers are on the trackpad
59while the button is pressed.
60.It Dv hw.uatpN.multifinger_track
61What to do when multiple fingers are moved on the trackpad.
62If set to 0, ignore the input.
63If set to 1, move as if a single finger were at the mean position of
64the fingers.
65If set to 2, scroll.
66Note that scrolling is currently broken.
67.It Dv hw.uatpN.x_sensors
68Number of sensor columns detecting the x positions of fingers on the
69trackpad.
70The driver should detect this based on the model of hardware, so you
71should not have to set this, and likewise for the x ratio and y
72sensors and ratio.
73.It Dv hw.uatpN.x_ratio
74Ratio of the number of sensor columns in the trackpad to the number of
75distinct cursor x positions.
76.It Dv hw.uatpN.y_sensors
77Number of sensor rows detecting the y positions of fingers on the
78trackpad.
79.It Dv hw.uatpN.y_ratio
80Ratio of the number of sensor rows in the trackpad to the number of
81distinct cursor y positions.
82.It Dv hw.uatpN.sensor_threshold
83Nonnegative integer giving a lower bound on the
84.Dq pressure
85a sensor must report for the driver to recognize input from it.
86.It Dv hw.uatpN.sensor_normalizer
87Nonnegative integer to subtract from the
88.Dq pressure
89reported by a sensor when averaging them to estimate the pressure of a
90single finger.
91.It Dv hw.uatpN.palm_width
92If zero, palm detection is disabled.
93Otherwise, a positive integer giving the number of consecutive sensors
94wide or high that will be interpreted as a palm instead of a finger and
95therefore ignored.
96.It Dv hw.uatpN.old_raw_weight
97.It Dv hw.uatpN.old_smoothed_weight
98.It Dv hw.uatpN.new_raw_weight
99When a finger moves on the trackpad, the new smoothed (cursor) position
100is computed as a positive linear combination of the old raw (trackpad)
101position, the old smoothed position, and the new raw position.
102The weights of the linear combination are given by these sysctl knobs.
103.It Dv hw.uatpN.motion_threshold
104Threshold below which a difference in smoothed position will not be
105reported as an input event to userland.
106.It Dv hw.uatpN.motion_multiplier
107Positive integer by which a difference in smoothed position will be
108multiplied before passing it as an input event to userland.
109.It Dv hw.uatpN.motion_divisor
110Positive integer by which a difference in smoothed position will be
111divided, after multiplying it by the motion multiplier, before passing
112it as an input event to userland.
113.It Dv hw.uatpN.fast_motion_threshold
114Threshold above which to use the fast motion factors below.
115.It Dv hw.uatpN.fast_motion_multiplier
116Positive integer by which to multiply a large difference in smoothed
117position.
118.It Dv hw.uatpN.fast_motion_divisor
119Positive integer by which to divide a large difference in smoothed
120position, after multiplying it by the fast motion multiplier.
121.It Dv hw.uatpN.motion_delay
122Number of input packets before
123.Nm
124reports motion to userland.
125.It Dv hw.uatpN.tap_limit_msec
126Positive integer giving the number of milliseconds of a finger's
127contact with the trackpad before it will not be considered a tap.
128.It Dv hw.uatpN.double_tap_limit_msec
129Positive integer giving the maximum number of milliseconds after a tap
130before a second tap will keep the button down.
131.It Dv hw.uatpN.one_finger_tap_buttons
132Bit mask of buttons that a one-finger tap will press.
133.It Dv hw.uatpN.two_finger_tap_buttons
134Bit mask of buttons that a two-finger tap will press.
135.It Dv hw.uatpN.three_finger_tap_buttons
136Bit mask of buttons that a three-finger tap will press.
137.It Dv hw.uatpN.tap_track_distance_limit
138Maximum distance in smoothed position that will be interpreted as a tap
139instead of motion.
140.El
141.Sh SEE ALSO
142.Xr ums 4 ,
143.Xr wsmouse 4
144.Sh HISTORY
145The
146.Nm
147driver first appeared in
148.Nx 7.0 .
149.Sh AUTHORS
150The
151.Nm
152driver was originally written by
153.An Taylor R. Campbell Aq Mt riastradh@NetBSD.org .
154.Sh BUGS
155Sometimes, particularly when X starts up, the driver gets wedged in an
156interrupt storm and does not reset the device.
157Setting
158.Li hw.uatpN.sensor_threshold
159to a large number, say 1000, and then back to its original value, can
160fix this.
161.Pp
162Palm detection is not very robust.
163.Pp
164Multi-touch scrolling is currently broken.
165.Pp
166Pinch-to-zoom and other fancy multi-touch input is not implemented.
167.Pp
168On suspending and resuming,
169.Nm
170detaches and reattaches, and loses all sysctl settings in the process.
171.Pp
172Do not submerge your
173.Nm
174devices in water: USB adenosine triphosphate is unstable in water, and
175will hydrolyze to USB adenosine diphosphate and phosphate, which is a
176lower energy state that makes your mouse narcoleptic in X.
177