Re: Option key state
Re: Option key state
- Subject: Re: Option key state
- From: Ondra Cada <email@hidden>
- Date: Mon, 11 Feb 2002 19:32:37 +0100
Josh,
>
>>>>> Josh Aas (JA) wrote at Mon, 11 Feb 2002 11:27:14 -0600:
JA> I need to test whether the option key is being held down or not when my
JA> application is launching.
That's noot a very good idea, IMHO: although currently the behaviour is
broken with Finder, normally the file manager should launch another copy of
application in this case. I bitterly do agree that there is quite remote
possibility Apple would fix Finder to behave correctly, but it is quite
probable other filemanagers would. If so, there would be clash between this
and your app.
JA> from an NSEvent, but I don't really have one. I need to check the option
JA> key's state in the following method delegated by NSApplication.
Alas, this is a gap in the OpenStep design: there is no standard way of
getting the state of any modifier key before the first event was delivered.
If you can use a non-Cocoa code, Carbon has an answer to that. Otherwise you
are out of luck, AFAIK.
JA> Thanks! And I assume the name for the option key's keymask is
JA> "NSAlternateKeyMask"?
Since the key name's "Alternate", obviously! The name "option" is a piece of
Classic, obsoleted now: just have a look at the keyboard, even it reads
"alt" (not "opt") ;)
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.