Get keystrokes without subclassing NSWindow or NSView
Get keystrokes without subclassing NSWindow or NSView
- Subject: Get keystrokes without subclassing NSWindow or NSView
- From: Mike <email@hidden>
- Date: Mon, 04 Aug 2008 15:52:47 -0700
I have a simple Cocoa app with one app controller that controls everything.
Inside my controller class I have an NSWindow, which is my main window,
and a WebView, which in IB, resides in the window.
In my app's controller class I want to be able to:
1) Intercept, inspect, and then forward any keystrokes pressed on the
keyboard, including character and modifers keys.
2) Detect when any given keystrokes are occurring in an edit field in
the WebView (some pages will have edit fields, some won't).
Is there an easy way to get both in the controller class without having
to subclass either my window or the WebView?
Thanks,
Mike
_______________________________________________
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