In that case, then you should pass the unwanted event to the superclass, which will handle the event in that case.

Ah, you mean like this, I suppose?

                [super keyDown: theEvent];

That seems to work like a charm. Thanks a million!

(For the record, I thought that user code is not supposed to call keyDown and the likes,
that's why I tried this:

  CGEventRef ourEvent = CGEventCreate(NULL);
CGPoint point = CGEventGetLocation(ourEvent); // get current mouse location
  point.x += 1.0;
ourEvent = CGEventCreateMouseEvent( NULL, kCGEventMouseMoved, point, kCGMouseButtonCenter );
  CGEventSetType(ourEvent, kCGEventMouseMoved);
CGEventPost( kCGSessionEventTap, ourEvent ); // post mouse moved event
  CFRelease( ourEvent );

But that sometimes worked, sometimes not.)


Best regards,
Gabriel.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to