• 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 a keystroke
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sending a keystroke


  • Subject: Sending a keystroke
  • From: Stephane ODUL <email@hidden>
  • Date: Sat, 21 Sep 2002 05:15:45 -0700

Hi,

I have a cocoa tool (background app) that must simulate a keystroke from the user. It's a very simple thing. I just want to send a Print and a Close command: Cmd+P or Cmd+W, as those shortcuts are some kind of system wide it should work with most of the available apps.

I've tried to use the AppleScript approach but this do not work will all the applications.

Any guide on which functions I have to use, or some sample code would be great.

Thank you

Stephane ODUL
http://www.soft.odul.com/
_______________________________________________
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 a keystroke
      • From: email@hidden
  • Prev by Date: Re: How to get _all_ URL Handlers in Mac OS X?
  • Next by Date: Re: NSAttributedString and HTML
  • Previous by thread: Re: How to get _all_ URL Handlers in Mac OS X?
  • Next by thread: Re: Sending a keystroke
  • Index(es):
    • Date
    • Thread