• 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: Invoking 'a Paste' Programmatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Invoking 'a Paste' Programmatically


  • Subject: Re: Invoking 'a Paste' Programmatically
  • From: Peter Maurer <email@hidden>
  • Date: Sat, 11 Oct 2008 22:15:44 +0200

I have global HotKey registered using Carbon, and this HotKey invokes a method in which I'm replacing the contents of the general Pasteboard. [...] I'm wondering if there is a way to programmatically call 'Paste', or if there are any facilities in Cocoa for simulating key presses?

Actually, there's a ton of applications that do roughly the same thing you intend to do (including two apps originally created by yours truly). And unfortunately, I've never come across a better way to invoke pasting than simulating a cmd-v keystroke, just like Colin said.


If you choose to do it the same way, don't forget to think about non- standard keyboard layouts, e.g., Dvorak. ;-)

Cheers,

Peter.
_______________________________________________

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: 
 >Invoking 'a Paste' Programmatically (From: Joshua Brickner <email@hidden>)

  • Prev by Date: Re: NSNull and @""
  • Next by Date: Re: Searching a CoreData bound NSArrayController
  • Previous by thread: Re: Invoking 'a Paste' Programmatically
  • Next by thread: About Launch Other Program
  • Index(es):
    • Date
    • Thread