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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to