• 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
KeyDown event
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

KeyDown event


  • Subject: KeyDown event
  • From: Joe Chan <email@hidden>
  • Date: Tue, 23 Oct 2001 21:20:58 -0400

I would like to process individual key down event in my window. Looking at NSResponder, I overrode keyDown: of my window controller. The question I have about the NSEvent object is the message characters. It returns an NSString, which means that it can potentially return more than one characters. My question is: if I just want to find out which key the user pressed (with the appropriate key mapping already applied), is [theEvent characters] a reliable way to accomplish that? In other words, I can assume that if the key down event is not repeating, the event object will always return one character, which corresponds to the key the user pressed?

-----------
Joe Chan
email@hidden
http://www.firstian.com


  • Follow-Ups:
    • Re: KeyDown event
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: More on: converting C-strings to NSString
  • Next by Date: Drag and drop-folders
  • Previous by thread: Re: NSImage file types
  • Next by thread: Re: KeyDown event
  • Index(es):
    • Date
    • Thread