Re: Send Key Event to Focused Window
Re: Send Key Event to Focused Window
- Subject: Re: Send Key Event to Focused Window
- From: j o a r <email@hidden>
- Date: Wed, 18 Jun 2008 07:39:07 -0700
On Jun 18, 2008, at 4:25 AM, Daniel wrote:
Basically, I've noticed that the code I'm using works (as it sends the
right event), but it is sent to the wrong "receiver". That means I'm
sending it to my current application, instead I should be able to
click on a button (representing a key stroke) and sending the event
(e.g. Safari) to the right application.
Cocoa is not a "cross-process" API, for the most part, so that would
be expected.
In the code you posted you used a reference to "NSApp". This is a
reference to your own application, it's not a reference to some other
application. The OS prevents you from interacting directly with the
internals of other applications for stability and security reasons.
You should be able to do what you want using Quartz Event Services.
Is there a way to build a focus-less application/window?
Can you explain what you mean by that?
j o a r
_______________________________________________
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