Jens –
I've been wanting to do similar key handling in my controller class
(rather than view classes), so I'm glad I'm not the only one not fully
grokking the responder chain. I got some helpful responses to my more
specific question, but without loss of generality. Especially:
On Sat, 19 Jul 2008 12:34:45 -0700, Jens Alfke [EMAIL PROTECTED] said:
On 19 Jul '08, at 8:52 AM, Matt Neuburg wrote:
Try it and see. Let's say we want to catch Esc directed to the
window as a
whole (to exit full screen mode, if I recall your example). So what
I would
do is to insert an
On Thu, 17 Jul 2008 09:31:53 -0700, Jens Alfke [EMAIL PROTECTED] said:
On 16 Jul '08, at 2:53 PM, Matt Neuburg wrote:
Implement keyDown: in the NSWindowController?
keyDown: only gets sent to the key view, whether or not it handles
that keystroke. Since the method returns void, there's no way
On 19 Jul '08, at 8:52 AM, Matt Neuburg wrote:
Try it and see. Let's say we want to catch Esc directed to the
window as a
whole (to exit full screen mode, if I recall your example). So what
I would
do is to insert an NSResponder instance behind the window in the
chain and
implement
On Jul 19, 2008, at 2:34 PM, Jens Alfke wrote:
On 19 Jul '08, at 8:52 AM, Matt Neuburg wrote:
Try it and see. Let's say we want to catch Esc directed to the
window as a
whole (to exit full screen mode, if I recall your example). So
what I would
do is to insert an NSResponder instance
I had already tried implementing keyDown: in my controller object,
which is the window's delegate, to no avail. But that class is just
a direct subclass of NSObject, not NSResponder or
NSWindowController. I tried changing its superclass to NSResponder,
but that didn't help.
(I've never
On Jul 16, 2008, at 2:43 PM, Kyle Sluder wrote:
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
On 17 Jul '08, at 10:45 AM, Andy Lee wrote:
I'd add a (BOOL)handleMyKeyDown: method in a category of NSObject,
and override keyDown: in NSApplication to traverse windows,
delegates (perhaps including control delegates), and descendant
views until something returns YES.
Well, if I'm
I've run into this problem a few times now: I have an
NSWindowController subclass that manages a window. I want to handle
certain hot-keys in this window, for example Esc to exit full-screen
mode, or maybe use letter keys to switch tools as in Photoshop. Where
do I put the handler for
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
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?
On Wed, 16 Jul 2008 10:05:52 -0700, Jens Alfke [EMAIL PROTECTED] said:
I've run into this problem a few times now: I have an
NSWindowController subclass that manages a window. I want to handle
certain hot-keys in this window, for example Esc to exit full-screen
mode, or maybe use letter keys to
12 matches
Mail list logo