• 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: Handling key equivalents in a controller class?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling key equivalents in a controller class?


  • Subject: Re: Handling key equivalents in a controller class?
  • From: Jeff Johnson <email@hidden>
  • Date: Wed, 16 Jul 2008 14:00:58 -0500

On Jul 16, 2008, at 1:43 PM, Kyle Sluder wrote:

On Wed, Jul 16, 2008 at 2:00 PM, Jeff Johnson
<email@hidden> wrote:
NSWindow is an NSResponder, so you could create an NSWindow subclass and
override performKeyEquivalent: or keyDown: there.

Except what happens if a field editor is key? Then the editor swallows all keys, including Esc. Or if it doesn't do this by default, Esc is one of the keys that it can swallow because NSTextView uses it as the "autocomplete" hotkey.

Didn't this question come up a while ago, and the solution was to
override the event dispatching mechanism before it even reached the
responder chain?

--Kyle Sluder

Actually, the reverse happens: the Esc key gets sent to the window, which can swallow it and prevent autocompletion. Try it. :-)


In any case, though, it certainly depends on what you want to do with keys that are normally handled by a view in the window.

-Jeff

_______________________________________________

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: 
 >Handling key equivalents in a controller class? (From: Jens Alfke <email@hidden>)
 >Re: Handling key equivalents in a controller class? (From: Jeff Johnson <email@hidden>)
 >Re: Handling key equivalents in a controller class? (From: "Kyle Sluder" <email@hidden>)

  • Prev by Date: Re: Setting Core Data attribute values to related entity attribute values
  • Next by Date: Re: how to measure an attributedString or string with attributes
  • Previous by thread: Re: Handling key equivalents in a controller class?
  • Next by thread: Re: Handling key equivalents in a controller class?
  • Index(es):
    • Date
    • Thread