Re: How to track all keyboard event?
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