Catching a keyDown within draggingUpdated
Catching a keyDown within draggingUpdated
- Subject: Catching a keyDown within draggingUpdated
- From: Lorenzo <email@hidden>
- Date: Wed, 03 Jan 2007 17:58:01 +0100
Within a
- (unsigned int)draggingUpdated:(id <NSDraggingInfo>)sender
I need to check whether the user presses the key 'a'.
I tried to catch the keyDown event with:
NSEvent *theEvent = [NSApp currentEvent];
if([theEvent type] == NSKeyDown){
NSLog(@"NSKeyDown");
charPressed = [[theEvent characters] characterAtIndex:0];
}
No way.
So I tried to cacth the keyDown with
theEvent = [[self window] nextEventMatchingMask:eventMask];
but the application stucks.
I also added the method - (void)keyDown:(NSEvent*)theEvent
but during the drag it has never been invoked.
Any idea?
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden