summaryrefslogtreecommitdiffstats
path: root/share/man/man4/atp.4
blob: 10bb41f35c488bedb8058785d64f0a70ed2a317e (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
.\" Copyright (c) 2009 Rohit Grover <rgrover1 at gmail dot com>.
.\" 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.
.\" 3. Neither the name of the author nor the names of any co-contributors
.\"    may be used to endorse or promote products derived from this software
.\"   without specific prior written permission.
.\"
.\" 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.
.\"
.\" $FreeBSD$
.\"
.Dd November 12, 2009
.Dt ATP 4
.Os
.Sh NAME
.Nm atp
.Nd Apple touchpad driver
.Sh SYNOPSIS
To compile this driver into the kernel, place the following lines into
your kernel configuration file:
.Bd -ragged -offset indent
.Cd "device atp"
.Cd "device usb"
.Ed
.Pp
Alternatively, to load the driver as a
module at boot time, place the following line in
.Xr loader.conf 5 :
.Bd -literal -offset indent
atp_load="YES"
.Ed
.Sh DESCRIPTION
The
.Nm
driver provides support for the Apple Internal Trackpad
device found in many Apple laptops.
.Pp
The driver simulates a three\-button mouse using multi\-finger tap
detection.
.
A single\-finger tap generates a left button click;
two\-finger tap maps to the middle button; whereas a three\-finger tap
gets treated as a right button click.
.
A double\-tap followed by a drag is treated as a selection gesture; a
virtual left\-button click is assumed for the lifespan of the drag.
.
.Nm
attempts to filter away activity at the horizontal edges of the
trackpad\-\-this is to keep unintentional palm movement from being
considered as user input.
.
.Pp
.Nm
supports dynamic reconfiguration using
.Xr sysctl 8 ;
through nodes under
.Nm hw.usb.atp .
Pointer sensitivity can be controlled using the sysctl tunable
.Nm hw.usb.atp.scale_factor .
.
.Sh HARDWARE
The
.Nm
driver provides support for the following Product IDs:
.Pp
.Bl -bullet -compact
.It
Core Duo MacBook & MacBook Pro (IDs: 0x0217, 0x0218, 0x0219)
.It
Core2 Duo MacBook & MacBook Pro (IDs: 0x021a, 0x021b, 0x021c)
.It
Core2 Duo MacBook3,1 (IDs: 0x0229, 0x022a, 0x022b)
.It
12 inch PowerBook and iBook (IDs: 0x030a, 0x030b)
.It
15 inch PowerBook (IDs: 0x020e, 0x020f, 0x0215)
.It
17 inch PowerBook (ID: 0x020d)
.El
.Pp
To discover the product\-id of a touchpad, search for 'Trackpad' in the
output of
.Xr lshal 1
and look up the property
.Nm usb_device.product_id .
.Sh FILES
.Nm
creates a blocking pseudo\-device file,
.Pa /dev/atp0 ,
which presents the mouse as a
.Ar sysmouse
or
.Ar mousesystems
type device\-\-see
.Xr moused 8
for an explanation of these mouse
types.
.Xr moused 8
can be configured to read touchpad data from
.Pa /dev/atp0
and pass it along to the
.Xr sysmouse 4
driver so that any process wanting to utilize mouse operation (such as
an X server) may fetch it from
.Pa /dev/sysmouse ;
alternatively,
.Pa /dev/atp0
may be manipulated via
.Xr read 2
and
.Xr ioctl 2
calls to get mouse data directly.
.Sh EXAMPLES
To use a compatible Apple Trackpad as your console mouse:
.Pp
.Dl moused -p /dev/atp0 -t auto
.Pp
To launch
.Xr moused 8
automatically upon boot, add the following to
.Pa /etc/rc.conf :
.Pp
.Dl moused_enable="YES"
.Dl moused_type="auto"
.Dl moused_port="/dev/atp0"
.Pp
If you want
.Xr moused 8
to also probe for external USB mice or other devices, then add the
following to
.Pa /etc/rc.conf :
.Pp
.Dl moused_nondefault_enable="YES"
.Dl moused_ums0_enable="YES"
.Dl moused_ums1_enable="YES"
.Pp
To be able to use the trackpad under X, change the "Pointer" section in
.Nm xorg.conf
to the following:
.Pp
.Dl Device "/dev/atp0"
.Dl Protocol "Auto"
.Pp
Better still, if you want to be able to use the mouse in both virtual
consoles as well as in X change it to:
.Pp
.Dl Device "/dev/sysmouse"
.Dl Protocol "Auto"
.Sh SEE ALSO
.Xr sysmouse 4 ,
.Xr usb 4 ,
.Xr loader.conf 5 ,
.Xr xorg.conf 5 Pq Pa ports/x11/xorg ,
.Xr moused 8 ,
.Xr sysctl 8
.Sh AUTHORS
.An -nosplit
The
.Nm
driver was written by
.An Rohit Grover Aq rgrover1@gmail.com .
OpenPOWER on IntegriCloud