NSDeleteCharacter when expected NSBackspaceCharacter
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