• 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
Handling arrow key events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Handling arrow key events


  • Subject: Handling arrow key events
  • From: Jonathan Jackel <email@hidden>
  • Date: Sun, 10 Mar 2002 15:43:02 -0500

How do I handle arrow keys in a keydown: handler? Handling the delete key
is easy. I do:

if ([[event characters] isEqualToString:@"\177"])

Works great. Arrow keys return what appears to be a similar control
character, e.g., "\uf702" for left arrow, but when I put that in the if
statement I get a warning "unknown escape sequence '\u'" and it never comes
up true. I see a reference to NSLeftArrowFunctionKey in the
NSEventConstants, but I am not grasping how to make it work.

Jonathan Jackel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Handling arrow key events
      • From: "Timothy J. Wood" <email@hidden>
  • Prev by Date: OpenGL Screen Savers Redux
  • Next by Date: Re: Handling arrow key events
  • Previous by thread: Re: OpenGL Screen Savers Redux
  • Next by thread: Re: Handling arrow key events
  • Index(es):
    • Date
    • Thread