To compile this driver into the kernel, place the following lines into your kernel configuration file:
device atp
device usbAlternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):
atp_load="YES"
The atp driver provides support for the
Apple Internal Trackpad device found in many Apple laptops.
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. atp 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.
atp supports dynamic reconfiguration using
sysctl(8); through nodes under
hw.usb.atp. Pointer sensitivity can be controlled
using the sysctl tunable
hw.usb.atp.scale_factor.
The atp driver provides support for the
following Product IDs:
To discover the product-id of a touchpad, search for 'Trackpad' in
the output of lshal(1) and look up the property
usb_device.product_id.
atp creates a blocking pseudo-device file,
/dev/atp0, which presents the mouse as a
sysmouse or mousesystems type
device--see moused(8) for an explanation of these mouse
types. moused(8) can be configured to read touchpad data
from /dev/atp0 and pass it along to the
sysmouse(4) driver so that any process wanting to utilize
mouse operation (such as an X server) may fetch it from
/dev/sysmouse; alternatively,
/dev/atp0 may be manipulated via
read(2) and ioctl(2) calls to get mouse
data directly.
To use a compatible Apple Trackpad as your console mouse:
moused -p /dev/atp0 -t
autoTo launch moused(8) automatically upon boot, add the following to /etc/rc.conf:
moused_enable="YES"moused_type="auto"moused_port="/dev/atp0"If you want moused(8) to also probe for external USB mice or other devices, then add the following to /etc/rc.conf:
moused_nondefault_enable="YES"moused_ums0_enable="YES"moused_ums1_enable="YES"To be able to use the trackpad under X, change the
"Pointer" section in xorg.conf to the
following:
Device /dev/atp0Protocol AutoBetter still, if you want to be able to use the mouse in both virtual consoles as well as in X change it to:
Device /dev/sysmouseProtocol Autosysmouse(4), usb(4), loader.conf(5), xorg.conf(5) (ports/x11/xorg), moused(8), sysctl(8)
The atp driver was written by
Rohit Grover ⟨rgrover1@gmail.com⟩.