• 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
Re: Return key in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Return key in NSTextView


  • Subject: Re: Return key in NSTextView
  • From: Markus Hitter <email@hidden>
  • Date: Fri, 28 Sep 2001 13:55:07 +0200

Am Freitag, 28. September 2001 um 02:08 schrieb Dustin Mierau:

Hello again.

What is the best way to be informed when a key has been pressed in an NSTextView? I obviously want to intercept a key and do some other action when it is hit, and let all other keys go to the NSTextView object.


Have a look at this delegate:

- (BOOL)textView:(NSTextView *)view
shouldChangeTextInRange:(NSRange)range
replacementString:(NSString *)replacementString;

Will be called for almost every single character while typing. Will allow you to intercept pasted text, too.


Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/


References: 
 >Return key in NSTextView (From: Dustin Mierau <email@hidden>)

  • Prev by Date: Security-related APIs
  • Next by Date: Re: AppleScript Studio.
  • Previous by thread: Re: Return key in NSTextView
  • Next by thread: NSTextViews and initial first responders
  • Index(es):
    • Date
    • Thread