• 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: Raw keyboard events under Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Raw keyboard events under Cocoa (From: Shayne Wissler <email@hidden>)

  • Prev by Date: Raw keyboard events under Cocoa
  • Next by Date: Fwd: [Bug 68083] [Help Wanted][Variant] Add support for Objective-C
  • Previous by thread: Raw keyboard events under Cocoa
  • Next by thread: Fwd: [Bug 68083] [Help Wanted][Variant] Add support for Objective-C
  • Index(es):
    • Date
    • Thread