• 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
Cocoa Event Monitor?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Cocoa Event Monitor?
      • From: Michael Ash <email@hidden>
    • Re: Cocoa Event Monitor?
      • From: Seth Willits <email@hidden>
  • Prev by Date: Re: NSProgressIndicator (spinning) on a dark background?
  • Next by Date: IB v7.03 appears to corrupt an xib last generated by IB v7.02
  • Previous by thread: Re: IKImageBrowserView - multiline labels
  • Next by thread: Re: Cocoa Event Monitor?
  • Index(es):
    • Date
    • Thread