Re: Delete Character keydown event
Re: Delete Character keydown event
- Subject: Re: Delete Character keydown event
- From: Robert Clair <email@hidden>
- Date: Mon, 14 Nov 2005 22:55:22 -0500
NSDeleteCharacter is a character constant, not a string:
enum {
NSParagraphSeparatorCharacter = 0x2029,
NSLineSeparatorCharacter = 0x2028,
NSTabCharacter = 0x0009,
NSFormFeedCharacter = 0x000c,
NSNewlineCharacter = 0x000a,
NSCarriageReturnCharacter = 0x000d,
NSEnterCharacter = 0x0003,
NSBackspaceCharacter = 0x0008,
NSBackTabCharacter = 0x0019,
NSDeleteCharacter = 0x007f
};
(127 - unicode for delete character)
ergo in keyDown event:
if( [[currentEvent characters] characterAtIndex:0] ==
NSDeleteCharacter )
{
//whatever
}
......Bob Clair
_______________________________________________
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