How can I detect if a user's hand is on the right side of a magic mouse? Not right clicking, just checking what side of the mouse the finger is on.
-
Are you making some assumption about how the mouse is held? When I'm holding a mouse, I have a finger on both buttons. I don't think that's unusual. – Steve Waddicor Jul 03 '13 at 18:38
-
No, really i'm just trying to see if a finger is on the right side of the mouse. Though it would be interesting to see how people hold the mouse. – Adam Meyer Jul 10 '13 at 01:11
2 Answers
Unless you write something in the IOKit to handle this, it isn't that easy. What the App gets is what the driver (kext) sends it.
You could get something like Better Touch Tool or Magic Prefs which opens up a variety of options i.e. positions of fingers on mouse, where fingers are and are not registered etc...
Writing IOKit kext's isn't a simple process, but you could begin here:
Other than that, you're stuck with what the kext sends to your App as a notification.

- 2,186
- 1
- 16
- 21
Apple official driver is really limited . This include the lack of support for advanced gestures like pinch and rotate.
The following proof of concept grab (very rawly) the pinch event, using the euclide's distance between the two fingers, and send a combined keystrokes as response to the front most application (kCGHIDEEventTap). Launching the binary and bring a Preview.app window to the front, you'll able to pinch in/out, using your magic mouse...amazing! :-)
Take a look at http://www.iphonesmartapps.org/aladino/?a=multitouch
Extending Functionality of Magic Mouse: Do I Need a kext?
Apple Magic Mouse Api

- 1
- 1

- 22,812
- 8
- 71
- 144