• 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: Character value of 'Enter' and 'Return' Key ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Character value of 'Enter' and 'Return' Key ?


  • Subject: Re: Character value of 'Enter' and 'Return' Key ?
  • From: Douglas Davidson <email@hidden>
  • Date: Tue, 28 Mar 2006 09:04:02 -0800


Im using one function [(NSString*) str characterAtIndex:(some index)] . I
have a text view where I can enter space,enter and return characters. I
wanted to know the value of 'Enter' and 'Return' key.


The return and enter keys by default are bound to insertNewline:, which in a text view that is not a field editor will by default insert \n, i.e. 0xa. However, for general text processing you should not depend on any particular break character; instead, you should use NSString methods like getLineStart:end:contentsEnd:forRange:, lineRangeForRange:, getParagraphStart:end:contentsEnd:forRange:, or paragraphRangeForRange:, which will handle any of the commonly used break characters.


Douglas Davidson

_______________________________________________
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


References: 
 >Character value of 'Enter' and 'Return' Key ? (From: "Vaibhav Machhar" <email@hidden>)
 >Re: Character value of 'Enter' and 'Return' Key ? (From: Steve Christensen <email@hidden>)

  • Prev by Date: Re: Returning from an IBAction
  • Next by Date: Re: Subject: NSTextView and ruler tab settings
  • Previous by thread: Re: Character value of 'Enter' and 'Return' Key ?
  • Next by thread: Re: Character value of 'Enter' and 'Return' Key ?
  • Index(es):
    • Date
    • Thread