• 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
NSDeleteCharacter when expected NSBackspaceCharacter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDeleteCharacter when expected NSBackspaceCharacter


  • Subject: NSDeleteCharacter when expected NSBackspaceCharacter
  • From: j o a r <email@hidden>
  • Date: Fri, 13 May 2005 11:28:05 +0200


I'm intercepting key events in a NSTableView subclass and found that I get a NSDeleteCharacter when I expected a NSBackspaceCharacter. Weird, or as it should be? I'm just looking for some opinions / input...


- (void) keyDown:(NSEvent *) event
{
unichar key = [[event charactersIgnoringModifiers] characterAtIndex: 0];


NSLog(@"DeleteChar: %d, BackspaceChar: %d, DeleteFunctionKey: % d", (key == NSDeleteCharacter), (key == NSBackspaceCharacter), (key == NSDeleteFunctionKey));
}


Hit backspace (surprising result):
2005-05-13 11:15:49.151 MyApp[4925] DeleteChar: 1, BackspaceChar: 0, DeleteFunctionKey: 0


Hit delete (mostly expected result):
2005-05-13 11:16:00.044 MyApp[4925] DeleteChar: 0, BackspaceChar: 0, DeleteFunctionKey: 1


j o a r


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: NSDeleteCharacter when expected NSBackspaceCharacter
      • From: "Sean McBride" <email@hidden>
  • Prev by Date: Re: AXIsProcessTrusted / AXMakeProcessTrusted
  • Next by Date: Re: recvmsg() in Tiger
  • Previous by thread: Re: Core Data and Non-standard attributes
  • Next by thread: Re: NSDeleteCharacter when expected NSBackspaceCharacter
  • Index(es):
    • Date
    • Thread