• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Get keystrokes without subclassing NSWindow or NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: "backporting" nibs question / Rhapsody license anyone?
  • Next by Date: Re: CGImageSourceCreateFromURL failed with error -11
  • Previous by thread: Re: Opening and Saving an RTFD
  • Next by thread: guidelines/tutorial for implementing custom controls
  • Index(es):
    • Date
    • Thread