On 28/06/2009, at 9:26 AM, DKJ wrote:


I detect the Return key by checking whether the input string is equal to @"\n". But how would I detect the back-delete key? @"\b" doesn't do it. And I can't seem to find any docs that list these codes.

Have you tried to use the NSString method -initWithCString:encoding: to create a string containing the ASCII character corresponding to the backspace key (I believe it's \x08) ? You'd use NSASCIIStringEncoding as the encoding and then you could use the resulting string to compare against the user input.

I don't know if this will work. I haven't tried it, but I thought I'd mention it anyway.

Wagner
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to