• 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: Bruce Truax <email@hidden>
  • Date: Fri, 02 Jan 2004 09:10:51 -0500

On 1/2/04 1:51 AM, "ayyapu" <email@hidden> eloquently wrote:

> Hi
>
> How can we get notified when the user presses shift or apple keys etc.
>
> -Ayyapu

Here is a simple example of how to test for the shift key or the option key
pressed events from a subclass of NS application:

BOOL specialKeyDown = ([ [self currentEvent] modifierFlags]
& (NSShiftKeyMask | NSAlternateKeyMask)) !=0;

Bruce


--
____________________________________________________________
Bruce E. Truax email: email@hidden
Optical Engineering Consultant

Diffraction Limited Design LLC
388 Wedgewood Road voice: 860-276-0450
Southington, CT 06489 fax: 860-620-9026
http://www.dld-llc.com
_____________________________________________________________
_______________________________________________
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: Re: Encryption
  • Next by Date: Re: Strange crash log
  • Previous by thread: Re: How can we get notified when the user presses shift or apple keys etc.
  • Next by thread: Code optimization
  • Index(es):
    • Date
    • Thread