title: Is there a way to trigger gesture events on Mac OS X?
body: <p>I want to trigger multitouch gesture events on Mac OS X. Is there a way to do this? Mouse or keyboard events can be triggered with CGEventCreateMouseEvent and CGEventCreateKeyboardEvent. Is there similar low level function for multitouch events?</p>
  
  <p>Rok</p>
  
  <hr>
  
  <p>Your suggestion is not working. I've tried this code:
  <code><pre>- (void)rotateWithEvent:(NSEvent *)event {
      NSLog(@"ROTATE");
  }
  -(IBAction)button:(id)sender {
      CGEventSourceRef eventSource = CGEventSourceCreate(kCGEventSourceStateCombinedSessionState);
      CGEventRef event = CGEventCreate(eventSource);
      CGEventSetType(event, NSEventTypeRotate);
      CGEventPost(kCGHIDEventTap, event);
      NSLog(@"POST EVENT");
  }</pre></code></p>
  
  <p>But function rotateWithEvent never gets called. Am I doing something wrong?</p>