Sending keyboard events
Sending keyboard events
- Subject: Sending keyboard events
- From: David Dauer <email@hidden>
- Date: Sun, 16 Nov 2003 09:10:42 +0100
Hi
I searched on mamasam, and found this:
CGInhibitLocalEvents(YES);
CGEnableEventStateCombining(NO);
CGSetLocalEventsFilterDuringSupressionState(kCGEventFilterMaskPermitAllEvent
s, kCGEventSupressionStateSupressionInterval);
CGPostKeyboardEvent( (CGCharCode)0, (CGKeyCode)55, true); //shift down
CGPostKeyboardEvent( (CGCharCode)'v', (CGKeyCode)9, true); //"v" down
CGPostKeyboardEvent( (CGCharCode)'v', (CGKeyCode)9, false); //"v" up
CGPostKeyboardEvent( (CGCharCode)0, (CGKeyCode)55, false); //shift up
CGEnableEventStateCombining(YES);
CGInhibitLocalEvents(NO);
But this does not seem to work here- (from a menu extra).
Any idea?
Thanks
David
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.