Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I synthesize Cocoa multi-touch gesture events?
    primarykey
    data
    text
    <p>Dear stackoverflow folks! To this day I never saw the need to ask a question, because all of you have done a great job in asking and answering nearly all of the code-related problems I encountered. So, thank you for that!</p> <p>At the moment I am working on an iOS application that is able to process raw touch events. These are then sent to an iMac over a WiFi network (the protocol I use is OSC). On the OS X side there is a server application listening for these OSC messages and converting them to mouse pointer movement / mouse button press / multi-touch gestures. So basically I want to build a (of course much more basic) software-bundle like mobile mouse (<a href="http://mobilemouse.com/" rel="nofollow noreferrer">http://mobilemouse.com/</a>) that I am able to adapt to the needs of our customers (by the means of customizing colors / additional buttons / gestures, and so on) for small remote control projects.</p> <p>Right now, everything works but the multitouch gestures (pinch, rotate, two-finger-scroll). So my question is: <strong>How can I programmatically create and post a multitouch gesture event?</strong></p> <p>I searched a lot and found some threads about it here on stackoverflow, but none of them could help me: <a href="https://stackoverflow.com/questions/2487331/is-there-a-way-to-trigger-gesture-events-on-mac-os-x">Is there a way to trigger gesture events on Mac OS X?</a> - <a href="https://stackoverflow.com/questions/10799666/is-there-a-way-to-change-rotation-of-gesture-events?lq=1">Is there a way to change rotation of gesture events?</a> - <a href="https://stackoverflow.com/questions/6699165/generate-and-post-multitouch-events-in-os-x-to-control-the-mac-using-an-external?lq=1">Generate and post Multitouch-Events in OS X to control the mac using an external camera</a> - ...</p> <p>Update 1: The last thing I tried was:</p> <pre><code>CGEventSourceRef eventSource = CGEventSourceCreate(kCGEventSourceStateCombinedSessionState); CGEventRef event = CGEventCreate(eventSource); CGEventSetType(event, NSEventTypeMagnify); CGEventPost(kCGHIDEventTap, event); CFRelease(eventSource); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload