• 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 key presses to another app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sending key presses to another app


  • Subject: sending key presses to another app
  • From: justin webster <email@hidden>
  • Date: Mon, 3 May 2004 16:53:11 +1200

I know this topic in various forms has been thrashed on this and other forums but I just cant find what I need.

I have an AppleScript which uses System Events to bring a particular app to the front, then execute a series of key presses.
It works fine but is slow and difficult to implement elegantly from my Obj-C cocoa app.

I have found references to CGPostKeyboardEvent but I'm not sure how to implement it.
How do I specify the application I'm sending to.
How do I find the values for the particular keys I want to press?

I'm pretty new to cocoa and know nothing about carbon.
any hints appreciated
_______________________________________________
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.


  • Follow-Ups:
    • Re: sending key presses to another app
      • From: Bill Cheeseman <email@hidden>
  • Prev by Date: Re: Hello
  • Next by Date: Re: Message Notify
  • Previous by thread: Re: Hello
  • Next by thread: Re: sending key presses to another app
  • Index(es):
    • Date
    • Thread