Re: Handling key equivalents in a controller class?
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