Drag and get the keyDown
Drag and get the keyDown
- Subject: Drag and get the keyDown
- From: Lorenzo <email@hidden>
- Date: Sun, 12 Sep 2004 17:31:04 +0200
Hi,
I want to drag a file on my window and, depending on which key is currently
down, import that file in different ways. The keys are mot modifier keys.
They are simple characters like "t", "g"....
The problem is that when I release the mouse button and the drag ends with
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
the keyDown method is not invoked longer. And the current Event is not a
keyBoard event. I never see the log here below.
if([[NSApp currentEvent] type] == NSKeyDown){
NSLog(@"Release mouse button and a key is down");
}
So I cannot detect which key is currently down. So I tried to get the
keyDown before the drag starts but if my app is not the foremost app, this
technic doesn't work.
Last and big problem, if a key (e.g. the key "g") is down, I see the mouse
moving on the window and out of the window very slowly, even if I am not
dragging anything.
Do you know how to do what I have in my mind properly?
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
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