Hi, I wrote a driver for the Apple Magic Mouse, as the protocol was mostly decoded by a Linux developer, and Somebody was kind enough to send me one..
http://www.netbsd.org/~plunky/btmagic.4 http://www.netbsd.org/~plunky/btmagic.c The mouse itself is a wireless Bluetooth mouse and operates with the USB HID protocol much like other mice, but it doesn't provide a proper descriptor and requires features to be activated and special interpretations of the touch surface reports, so doesn't fit exactly into our HID framework, which configures independent sub-devices to report id's from the descriptor. The driver interprets the touch reports to allow emulation of a middle mouse button (for mulitple firm touches detected), and horizontal and vertical scroll actions (for touches moving over a certain distance). It works well on NetBSD-current and NetBSD-5 and the mouse is pretty slick. The mouse provides reports with much information about up to 5 (I think) touches but we don't really have a way to serve this information to userland at this time.. probably in the future there needs to be some kind of wstouch driver that could handle them. I'm not sure how it would work really but if anybody has ideas about that then feel free to contact me. Comments? iain [ultimately we need a new HID framework that can cope with nonstandard devices like this, and the Bluetooth and USB portions should be merged, and the libusbhid code should be common with the kernel code that does the same thing. Its all been on my list for some time]