• 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: How to track all keyboard event?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to track all keyboard event?


  • Subject: Re: How to track all keyboard event?
  • From: Ken Thomases <email@hidden>
  • Date: Mon, 17 Mar 2008 20:04:54 -0500

On Mar 17, 2008, at 6:05 PM, frank.gongpengjun wrote:

I am porting a game onto Mac OS X, I need to track all keyboard event even it is not for me. How can I achieve that goal?

I'm not sure what you mean by "it is not for me".

If you need to see all keyboard events sent to your application, without having them processed through NSResponder and friends, you can subclass NSApplication and override -sendEvent:.

If you need to see all keyboard events including those sent to other applications, you will have to install a Quartz Event Tap. Look up CGEventTapCreate.

-Ken
_______________________________________________

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: 
 >How to track all keyboard event? (From: "frank.gongpengjun" <email@hidden>)

  • Prev by Date: Re: NSDate from xsd:dateTime / ISO 8601
  • Next by Date: Re: NSDate from xsd:dateTime / ISO 8601
  • Previous by thread: How to track all keyboard event?
  • Next by thread: Re: How to track all keyboard event?
  • Index(es):
    • Date
    • Thread