Copyright (c) 2010 The NetBSD Foundation, Inc.
All rights reserved.
This code is derived from software contributed to The NetBSD Foundation
by Iain Hibbert.
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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 22, 2010 .Dt BTMAGIC 4 .Os .Sh NAME .Nm btmagic .Nd Apple Magic Mouse .Sh SYNOPSIS .Cd "btmagic* at bthub?" .Cd "wsmouse* at btmagic?" .Sh DESCRIPTION The .Nm driver provides support for the .Tn Bluetooth .Dq Magic Mouse from .Tn Apple, Inc .
p The Magic Mouse uses the standard .Tn USB Human Interface Device protocol to communicate, but does not provide a proper HID Descriptor, and requires specific initializations to enable the proprietary touch reports.
p The Magic Mouse provides basic mouse functionality with two buttons, and the .Nm driver additionally interprets the touch reports to emulate a middle mouse button when more than one firm touch is detected during a click event, plus horizontal and vertical scrolling for touch movements greater than a certain distance. The mouse has a base resolution of 1300dpi, which the driver scales by default to a less sensitive 650dpi, but this is adjustable with .Xr sysctl 8 along with the pressure needed to discern a firm touch, the minimum distance necessary to trigger scrolling and the additional downscale factor applied to scroll movements.
p The Magic Mouse should be configured with the .Xr btdevctl 8 program and .Nm interfaces to the system as usual through the .Xr wscons 4 driver. The following properties are used during autoconfiguration: l -tag -width ".It remote-bdaddr" t vendor-id Must be 0x05ac. t product-id Must be 0x030d. t local-bdaddr Local device address. t remote-bdaddr Remote device address. t link-mode This optional string represents the link mode of the baseband link, and may be one of .Sq auth , .Sq encrypt , or .Sq secure . .El
p When the .Nm driver has configured, it will attempt to open a connection to the mouse and, if this fails or the connection is lost, will wait for the mouse to initiate connections. .Sh SEE ALSO .Xr bluetooth 4 , .Xr bthub 4 , .Xr wsmouse 4 , .Xr btdevctl 8 , .Xr sysctl 8 .Sh HISTORY The .Nm driver was written by .An Iain Hibbert with reference to the .Tn Linux driver written by .An Michael Poole .