• 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 09:24:40 -0500

Hey,

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?

Cheers,

Joe Turner
On Aug 21, 2009, at 5:49 PM, Eric Schlegel wrote:


On Aug 21, 2009, at 2:55 PM, Joe Turner wrote:

Hey,

So, until now, I've been using CGEvents for simulating a keyboard. This posed a problem when I figured out CGKeyCodes must be translated based on localization/keyboard layout. And now it poses an ever bigger problem because of 'kchr' keyboards, which it seems, all API's that can access them have been deprecated.

Could you use CGEventKeyboardSetUnicodeString to just supply the input text directly, rather than translating to a CGKeyCode?


-eric


_______________________________________________

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


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

  • Prev by Date: Re: Syntax Coloring?
  • Next by Date: Displaying svg image with WebKit - scaling issues
  • Previous by thread: Re: Best Way to Simulate Keyboard
  • Next by thread: Re: Best Way to Simulate Keyboard
  • Index(es):
    • Date
    • Thread