• 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: Pasting into another app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pasting into another app


  • Subject: Re: Pasting into another app
  • From: Dave DeLong <email@hidden>
  • Date: Fri, 09 Jan 2009 14:38:25 -0700

With the CGEvents, you don't have to post four. You can post two: One for V down and one for V up. You can use the modifierFlags on the CGEvent to specify that Command should be down on V down.

Dave

On Jan 9, 2009, at 2:34 PM, Michael Vannorsdel wrote:

Checkout CGEventCreateKeyboardEvent and CGEventPost to synthesize keyboard events. You have to make and post an event for the key down and then the key up. So: command key down, V key down, V key up, command key up. There's also CGPostKeyboardEvent which is easier to use but not recommended for all cases.
_______________________________________________

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: 
 >Re: Pasting into another app (From: Scott Ribe <email@hidden>)
 >Re: Pasting into another app (From: Michael Vannorsdel <email@hidden>)

  • Prev by Date: Re: Pasting into another app
  • Next by Date: Re: Bonjour server with multiple clients
  • Previous by thread: Re: Pasting into another app
  • Next by thread: Re: Pasting into another app
  • Index(es):
    • Date
    • Thread