Re: Up arrow in NSTextView
Re: Up arrow in NSTextView
- Subject: Re: Up arrow in NSTextView
- From: Adam <email@hidden>
- Date: Tue, 29 Mar 2005 18:35:43 -0500
Douh, I was actually talking about an NSTextField, however, I assume
the advice would be exactly the same.
Adam
On Mar 29, 2005, at 4:30 PM, Oliver Cameron wrote:
This is what I do, replace the unicode char number for the up key:
- (void)keyDown:(NSEvent *)theEvent
{
unichar unicodeChar;
NSString *characters;
characters = [theEvent characters];
unicodeChar = [characters characterAtIndex:0];
if (unicodeChar == 0x0009)
{
Do whatever happens on up key.
}
}
This is in a NSTextView subclass.
Thanks,
On 29 Mar 2005, at 22:23, Adam wrote:
What is the easiest way for me to detect that the user has pressed a
specific key in an NSTextView?
Adam
_______________________________________________
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
_______________________________________________
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