• 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 and Enter keys in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Return and Enter keys in NSTextView


  • Subject: Re: Return and Enter keys in NSTextView
  • From: "John C. Randolph" <email@hidden>
  • Date: Wed, 29 Aug 2001 16:19:25 -0700

On Wednesday, August 29, 2001, at 03:45 PM, Richard Schreyer wrote:

I've overridden keyDown: in NSTextView, and need to find out when the user has pressed either the Enter or Return keys.

I've looked through the docs of NSEvent, but I don't see any constants for these keys like there are for the Modifiers.

In NSText.h, there's a couple of unicode constants:

enum {
NSParagraphSeparatorCharacter = 0x2029,
NSLineSeparatorCharacter = 0x2028,
NSTabCharacter = 0x0009,
NSFormFeedCharacter = 0x000c,
NSNewlineCharacter = 0x000a,
NSCarriageReturnCharacter = 0x000d,
NSEnterCharacter = 0x0003,
NSBackspaceCharacter = 0x0008,
NSBackTabCharacter = 0x0019,
NSDeleteCharacter = 0x007f
};


I know I've seen a bunch more, but I don't recall where.

-jcr

"Scientology is both immoral and socially obnoxious... it is
corrupt, sinister and dangerous." - Mr. Justice Latey, London 1984


References: 
 >Return and Enter keys in NSTextView (From: Richard Schreyer <email@hidden>)

  • Prev by Date: Re: Return and Enter keys in NSTextView
  • Next by Date: Re: Return and Enter keys in NSTextView
  • Previous by thread: Re: Return and Enter keys in NSTextView
  • Next by thread: Re: Return and Enter keys in NSTextView
  • Index(es):
    • Date
    • Thread