Re: How can we get notified when the user presses shift or apple keys etc.
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.