Re: Getting keyDown for option key
Re: Getting keyDown for option key
- Subject: Re: Getting keyDown for option key
- From: Jeremy Dronfield <email@hidden>
- Date: Tue, 20 Apr 2004 21:00:56 +0100
Make your window a sublclass, and implement -flagsChanged:, which gets
called whenever modifier keys are pressed:
- (void)flagsChanged:(NSEvent *)theEvent
{
if ([theEvent modifierFlags] & NSAlternateKeyMask) { //mask for option
key
//do your stuff
}
}
Hope this helps.
Regards
-Jeremy
===================================
SkoobySoft, home of viJournal
email: email@hidden or visit:
http://freespace.virgin.net/jeremy.dronfield/skoobysoft.html
===================================
On 20 Apr 2004, at 7:42 pm, Darrin Cardani wrote:
I would like to change the cursor when it's over a particular window
and the user presses the option key. I have a -keyDown: method in the
window controller, but it doesn't get called when the user only
presses the option key. What do I need to do to get that key down
event?
Thanks,
Darrin
--
Darrin Cardani - email@hidden
President, Buena Software, Inc.
<http://www.buena.com/>
Video, Image and Audio Processing Development
_______________________________________________
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.