• 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: NSTextView keyDown Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView keyDown Question


  • Subject: Re: NSTextView keyDown Question
  • From: j o a r <email@hidden>
  • Date: Tue, 20 Dec 2005 11:37:02 +0100


On 20 dec 2005, at 11.30, Nik Youdale wrote:

This is a relatively simple question i think, but basically i have an NSTextView and I want to be able to check out the keys that the user presses when they type. If the key is not a 'special key' (defined in the program - for example: "(" or "/" or return), then i want that key to get passed on to the NSTextView like normal.

I have tried subclassing NSTextView and over-riding the keyDown method, but when i do that, nothing gets passed on to the textView.

I then tried keyUp which is good, except that it doesnt fire on repeated keystrokes, say if the user holds down a key.

Is there some method i can call to just pass on the text/action to the TextField if the key is of no interest to the application?

(I tried using insertText, but that doesnt work for delete and arrow keys, etc)

Have you tried using the "textView:shouldChangeTextInRange:replacementString:" delegate method?

j o a r


Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: NSTextView keyDown Question
      • From: Nik Youdale <email@hidden>
References: 
 >NSTextView keyDown Question (From: Nik Youdale <email@hidden>)

  • Prev by Date: Re: create a view without IB
  • Next by Date: Re: NSTextView keyDown Question
  • Previous by thread: NSTextView keyDown Question
  • Next by thread: Re: NSTextView keyDown Question
  • Index(es):
    • Date
    • Thread