What would be the most appropriate place to intercept CmdAnyKey key events in an NSDocument
based application?
Intention is to switch to some component in the active window - kind of like Firefox allows you to switch the tabs - without having a matching shortcut on a menu command to perform that task.
I.e. ideally the framework should do it's normal processing including handling menu commands and just after all other responders fail to respond to that particular shortcut it should be routed to the custom method.
I've searched NSDocument
, NSAppDelegate
, NSWindowController
but couldn't locate any appropriate mechanism to hook into in order to receive these commands on window level.
So lacking any existing customization mechanism does override keyDown:
in a custom NSWindowController
look like the most appropriate way to achieve the desired effect?