• 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: John Stiles <email@hidden>
  • Date: Tue, 18 Dec 2007 09:50:57 -0800

You can make an NSButton and set its key-equivalent to escape. If you don't want it to be visible you can hide it off the upper-left edge of the window or something like that (although it might still get tab focus, hmm).


Kenny Leung wrote:
Hi All.

I would like to trap the escape key for my window. I dug through the mail archives and found references to cancelOpeation:. This is exactly what I want. So I implemented cancelOperation: in my windowController, and get nothing. I just get the alert sound when I hit escape. Just to be sure, I also implemented keyDown: in my windowController, and those are getting through all right.

Has anyone out there bumped into this? It is so frustrating when simple things won't work!

Thanks!

-Kenny

_______________________________________________

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
_______________________________________________

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


References: 
 >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: Re: cancelOperation: does not work for trapping the escape key
  • Previous by thread: Re: cancelOperation: does not work for trapping the escape key
  • Next by thread: create managed object programmaticly
  • Index(es):
    • Date
    • Thread