• 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
Re: cancelOperation: does not work for trapping the escape key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cancelOperation: does not work for trapping the escape key


  • Subject: Re: cancelOperation: does not work for trapping the escape key
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Tue, 18 Dec 2007 18:54:26 +0100


Le 18 déc. 07 à 18:41, Kenny Leung a écrit :

Sorry, I was not clear. My class is a window controller, which means that it is in the responder chain after the window itself. It is successfully getting keyDown: events for other keys, but nothing gets called for the escape key. Just in case, I overrode acceptsFirstResponder to return YES, but no dice.

You can see a small example at http://www.hexdreams.com/temp/CancelOperationTest.zip that illustrates my point.

-Kenny


I think the - (BOOL)performKeyEquivalent:(NSEvent *)theEvent method catch your escape event before it reach the keyDown: method.
If performKeyEquivalent return YES, the keyDown: method will no be call.


You can find a very good graph fo the event flow here:

http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/EventArchitecture/chapter_2_section_3.html#/ /apple_ref/doc/uid/10000060i-CH3-SW10

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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


  • Follow-Ups:
    • Re: cancelOperation: does not work for trapping the escape key
      • From: Kenny Leung <email@hidden>
References: 
 >cancelOperation: does not work for trapping the escape key (From: Kenny Leung <email@hidden>)
 >Re: cancelOperation: does not work for trapping the escape key (From: Hank Heijink <email@hidden>)
 >Re: cancelOperation: does not work for trapping the escape key (From: Kenny Leung <email@hidden>)
 >Re: cancelOperation: does not work for trapping the escape key (From: Hank Heijink <email@hidden>)
 >Re: cancelOperation: does not work for trapping the escape key (From: Kenny Leung <email@hidden>)

  • Prev by Date: Re: cancelOperation: does not work for trapping the escape key
  • Next by Date: create managed object programmaticly
  • Previous by thread: Re: cancelOperation: does not work for trapping the escape key
  • Next by thread: Re: cancelOperation: does not work for trapping the escape key
  • Index(es):
    • Date
    • Thread