Search code examples
cocoamagic-mouse

Cocoa detect when hand is over right side of magic mouse


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.


Solution

  • 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