• 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
Re: Best Way to Simulate Keyboard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best Way to Simulate Keyboard


  • Subject: Re: Best Way to Simulate Keyboard
  • From: Joe Turner <email@hidden>
  • Date: Sat, 22 Aug 2009 13:51:25 -0500

But then I must have the CGKeyCode for the character i would like to post, which is what I'm trying to get away from.

When I do "CGEventSetFlags" on an event I've set a unicode string for, it doesn't work.

Joe
On Aug 22, 2009, at 11:46 AM, Bill Cheeseman wrote:


On Aug 22, 2009, at 10:24 AM, Joe Turner wrote:

That works well, until I add modifiers. To do my modifiers i put the modifier keys down before the character part, but this doesn't seem to work when the command key is down or something :/

Is there any way to supply modifiers into a single CGEvent?

There's an example somewhere in the docs. Basically, you send, for example, a command-key down event, then the character key down event, then the character key up event, then the command-key up event. Tedious but straightforward.



--

Bill Cheeseman
email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >Best Way to Simulate Keyboard (From: Joe Turner <email@hidden>)
 >Re: Best Way to Simulate Keyboard (From: Eric Schlegel <email@hidden>)
 >Re: Best Way to Simulate Keyboard (From: Joe Turner <email@hidden>)
 >Re: Best Way to Simulate Keyboard (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Re: Best Way to Simulate Keyboard
  • Next by Date: checkbox question
  • Previous by thread: Re: Best Way to Simulate Keyboard
  • Next by thread: Undocumented preparedCellAtColumn:-1 row:row
  • Index(es):
    • Date
    • Thread