• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Sending keyboard events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Instantiating Objects in Nib Files
  • Next by Date: Re: Instantiating Objects in Nib Files
  • Previous by thread: Re: Writing an NSArray to disk
  • Next by thread: 10.3 and objective-c exceptions
  • Index(es):
    • Date
    • Thread