2

I have seen that it is possible to use addGlobalMonitorForEventsMatchingMask: to watch for system wide events for mouse events, scroll events, key events, and even gesture events. I looked at NSEvents.h for the available event masks, but just could not find one for multi-touch events. Is it possible to do this for multi-touch events?

1

1 Answer 1

2
+200

I looked at NSEvents.h for the available event masks, but just could not find one for multi-touch events.

Looks like developer.apple.com has some documentation on the NSEvent class and refer to some touch events/gestures.

"Support for touch and gesture events masks have been added to NSEvent in Mac OS X v10.6...." developer.apple.com

If you're developing for an older OS version than the one specified in the quote, let me know.

EDIT: As far as the function you referenced it looks like the documentation says that touch events are currently not supported.

"In Mac OS X v 10.6, event monitors are only able to monitor the following event types..." addGlobalMonitorForEventsMatchingMask:handler

2
  • 2
    Doing a find using the link provided will take you to the list of supported events. However, in the case that the link no longer works: In Mac OS X v 10.6, event monitors are only able to monitor the following event types: NSLeftMouseDragged, NSRightMouseDragged, NSOtherMouseDragged, NSLeftMouseUp, NSRightMouseUp, NSOtherMouseUp, NSLeftMouseDown, NSRightMouseDown, NSOtherMouseDown, NSMouseMoved, NSFlagsChanged, NSScrollWheel, NSTabletPoint, NSTabletProximity, NSKeyDown (Key repeats are determined by sending the event an isARepeat message.)
    – sillv0r
    Dec 31, 2011 at 16:24
  • Thank you for the research. I had came to the same conclusion but it's nice to get confirmation from someone else.
    – airportyh
    Jan 1, 2012 at 3:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.