• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Catching a keyDown within draggingUpdated
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Switch/case with NSString?
  • Next by Date: Re: Drawer width problem
  • Previous by thread: Re: LineForm's Filters Table
  • Next by thread: using long double math functions like sinl() with Cocoa
  • Index(es):
    • Date
    • Thread