Re: Invoking 'a Paste' Programmatically
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