Re: Return and Enter keys in NSTextView
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