Re: Raw keyboard events under Cocoa
Re: Raw keyboard events under Cocoa
- Subject: Re: Raw keyboard events under Cocoa
- From: Ken Thomases <email@hidden>
- Date: Sat, 14 Feb 2009 17:59:49 -0600
On Feb 14, 2009, at 5:22 PM, Shayne Wissler wrote:
Is there a way in cocoa to get the raw key press/release events? Let's
say you were making a game that wanted to know when the control or
caps lock key was down or up, how would you do that in Cocoa?
For modifier keys, you get an NSFlagsChanged event. For other keys,
you get NSKeyDown and NSKeyUp events.
In an NSResponder subclass, the methods -flagsChanged:, -keyDown:, and
-keyUp: will be invoked for these events.
Is that what you were looking for?
Regards,
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