Cocoa Event Monitor?
Cocoa Event Monitor?
- Subject: Cocoa Event Monitor?
- From: dave d <email@hidden>
- Date: Fri, 6 Feb 2009 23:04:51 -0800 (PST)
Hi all,
I'm attempting to write a Cocoa app which listens for key down and key up events from a specified process. I've checked out Apple's Event Monitor example for Carbon:
http://developer.apple.com/samplecode/EventMonitorTest/index.html
This example has the functionality I want, but I'm wondering if there's a more efficient way to accomplish the same thing in Cocoa. Even if there's a Cocoa alternative that performs as well, I'd prefer it, since my app is Cocoa and I'd prefer to keep it pure Cocoa if I can.
I've done a lot of searching and the only thing that looks promising is NSDistributedNotificationCenter. Its documentation states that it's "expensive" though, and I'm not even sure it can be used for event reception if the target process isn't registered as a notifier.
If anyone can point me in the right direction to, or provide insight on viable alternatives to the Carbon method, I'd really appreciate it.
Dave
_______________________________________________
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