Option key state
Option key state
- Subject: Option key state
- From: Josh Aas <email@hidden>
- Date: Mon, 11 Feb 2002 11:27:14 -0600
Hello,
I need to test whether the option key is being held down or not when my
application is launching. I only know how to check the option key's state
from an NSEvent, but I don't really have one. I need to check the option
key's state in the following method delegated by NSApplication.
- (BOOL)application:(NSApplication*)anApplication
openFile:(NSString*)aFileName
{
if (appIsLaunching) {
wasLaunchedWithDocument = YES;
// check here for option key's state
}
[self doSomeThing:[NSArray arrayWithObject:aFileName]];
return YES;
}
Thanks! And I assume the name for the option key's keymask is
"NSAlternateKeyMask"?
-Josh Aas
_______________________________________________
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.