Re: Delete action from variety of key presses
Re: Delete action from variety of key presses
- Subject: Re: Delete action from variety of key presses
- From: Ken Thomases <email@hidden>
- Date: Mon, 7 Jul 2008 19:16:58 -0500
On Jul 7, 2008, at 6:59 PM, Nathan Vander Wilt wrote:
Thanks, I forgot to mention that I tried overriding some of those
action methods. However, I couldn't get them to fire.
If I implement:
- (BOOL)acceptsFirstResponder {
return YES;
}
- (void)keyDown:(NSEvent*)keyEvent {
(void)keyEvent;
printf("key event received\n");
}
You need to forward the event to -interpretKeyEvents:.
See <http://developer.apple.com/documentation/Cocoa/Conceptual/
EventOverview/HandlingKeyEvents/chapter_6_section_3.html>.
Sorry I didn't point that out before. I actually didn't realize that
was necessary and thought the default implementation of -keyDown: did
that.
Cheers,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden