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

On Wed, Jul 16, 2008 at 2:00 PM, Jeff Johnson
<[EMAIL PROTECTED]> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to