• 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: Function-Key Unicodes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Function-Key Unicodes


  • Subject: Re: Function-Key Unicodes
  • From: Ricky Sharp <email@hidden>
  • Date: Wed, 22 Dec 2010 21:05:47 -0600

On Dec 22, 2010, at 1:44 PM, email@hidden wrote:

> I call:
>
> 	NSString *chars = [theEvent charactersIgnoringModifiers];
>
> in -keyDown
>
> The docs say
>
> Function-Key Unicodes
>
> These constants represent Unicode characters (0xF700–0xF8FF) that are reserved for function keys on the keyboard. Combined in NSStrings, they are the return values of the NSEvent methods characters and charactersIgnoringModifiers and may be used in some parameters in the NSEvent methodkeyEventWithType:location:modifierFlags:timestamp:windowNumber:context:characters:charactersIgnoringModifiers:isARepeat:keyCode:.
>
>
> what is the proper way to see if chars is NSLeftArrowFunctionKey or NSRightArrowFunctionKey?


NSString* theEventCharacters = [anEvent charactersIgnoringModifiers];

if ([theEventCharacters length] > 0)
    {
    unichar theChar = [theEventCharacters characterAtIndex:0];

    if (theChar == NSLeftArrowFunctionKey)
        {
        ...



___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Function-Key Unicodes (From: email@hidden)

  • Prev by Date: Re: Vertical Asian Text in Cocoa
  • Next by Date: Colored Pattern example problems
  • Previous by thread: Function-Key Unicodes
  • Next by thread: Colored Pattern example problems
  • Index(es):
    • Date
    • Thread