• 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: Up arrow in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Up arrow in NSTextView


  • Subject: Re: Up arrow in NSTextView
  • From: Oliver Cameron <email@hidden>
  • Date: Tue, 29 Mar 2005 22:30:31 +0100

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
  • Follow-Ups:
    • Re: Up arrow in NSTextView
      • From: Adam <email@hidden>
    • Re: Up arrow in NSTextView
      • From: Douglas Davidson <email@hidden>
References: 
 >Up arrow in NSTextView (From: Adam <email@hidden>)

  • Prev by Date: Moving Files From /private/tmp
  • Next by Date: Re: Up arrow in NSTextView
  • Previous by thread: Up arrow in NSTextView
  • Next by thread: Re: Up arrow in NSTextView
  • Index(es):
    • Date
    • Thread