On Oct 10, 2009, at 1:13 PM, aaron smith wrote:
Quick question - I have a window that I run as a sheet, which contains an NSTextField to enter a message. I have the window setup to close the sheet when the Escape key is pressed, however, when the text field is focused I can't figure out how to respond to these types of special keys.
IIRC, this event gets handled by the button's -performKeyEquivalent: method, before normal key processing. You could override that method in another view to handle the Esc key, but it would probably need to be an ancestor view of the button. It might be easier just to clear the button's key equivalent property when the text view gets focus and restore it afterwards.
—Jens_______________________________________________ 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 arch...@mail-archive.com