Re: Detecting key down in application:OpenFile:
Re: Detecting key down in application:OpenFile:
- Subject: Re: Detecting key down in application:OpenFile:
- From: Ondra Cada <email@hidden>
- Date: Mon, 12 Dec 2005 15:50:51 +0100
John,
On 12.12.2005, at 4:33, John Timmer wrote:
Is it all possible to detect a key down mask when a file is dragged
to your
application icon? In the " application:OpenFile:" method, I've got
the
following code:
NSEvent *keyCheck = [theApplication currentEvent];
if ([keyCheck modifierFlags] & NSShiftKeyMask)
[self handleAlternate];
I fear that this drag&drop is not an event (it's an event for the
Dock application, which then sends some non-event inter-application
message to the app of yours).
But it doesn't seem to register the shift key consistently, either
in the
debugger, or via logging. Any suggestions would be greatly
appreciated.
Far as I can say, you have to check the current modifier state
independent of events (which, far as I know, at the moment is
possible through Carbon functions only).
---
Ondra Čada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden