• 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
capturing special keys when focused in an NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

capturing special keys when focused in an NSTextField


  • Subject: capturing special keys when focused in an NSTextField
  • From: aaron smith <email@hidden>
  • Date: Sat, 10 Oct 2009 13:13:42 -0700

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.

I've tried subclassing NSTexField and overriding keyDown:, but it
doesn't get called. And I've tried setting the text field's next
responder to be the controller object for the view, etc. No go.

Can someone point me in the right direction?

Thanks much.
_______________________________________________

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

  • Follow-Ups:
    • Re: capturing special keys when focused in an NSTextField
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: real verses Virtual memory
  • Next by Date: Re: real verses Virtual memory
  • Previous by thread: Re: "Old"-style (carbon?) blue generic view shows up under Logic
  • Next by thread: Re: capturing special keys when focused in an NSTextField
  • Index(es):
    • Date
    • Thread