• 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 can we get notified when the user presses shift or apple keys etc.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can we get notified when the user presses shift or apple keys etc.


  • Subject: Re: How can we get notified when the user presses shift or apple keys etc.
  • From: Daniel Todd Currie <email@hidden>
  • Date: Fri, 2 Jan 2004 03:47:27 -0800

Here's one way to do it:

Set your window(s) as an NSWindow subclass that implements the -keyDown: method. You can test what keys were pressed using the various NSEvent methods. Or you can use -flagsChanged: if you only care about modifier flags (shift, command, etc.).

// Daniel Currie


On 2004 Jan 01, at 22:51, ayyapu wrote:

Hi

How can we get notified when the user presses shift or apple keys etc.

-Ayyapu
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >How can we get notified when the user presses shift or apple keys etc. (From: ayyapu <email@hidden>)

  • Prev by Date: key value observing and binding
  • Next by Date: Re: Code optimization
  • Previous by thread: How can we get notified when the user presses shift or apple keys etc.
  • Next by thread: Re: How can we get notified when the user presses shift or apple keys etc.
  • Index(es):
    • Date
    • Thread