keyDown event processing -- harder than it looks?
keyDown event processing -- harder than it looks?
- Subject: keyDown event processing -- harder than it looks?
- From: Michael Crawford <email@hidden>
- Date: Tue, 11 Jan 2011 14:17:44 -0500
I'm trying to process a simple keyDown event by overriding -keyDown on the NSWindowController derived class for my main window.
I've overridden the appropriate methods but I'm getting strange console message:
Type selection took over 1.000 seconds. Stopping early....
These are my overrides.
- (BOOL)acceptsFirstResponder
{
return YES;
}
- (void)keyDown:(NSEvent*)event
{
if ( kVK_Space == event.keyCode )
{
[controller tap:self];
}
else
{
[super keyDown:event];
}
}
I have to admit, it has been a long time since I was interested in Mac keyboard events and for the past two years, I've been working mainly in iPhoneOS (iOS).
What do I need to do to successfully trigger behavior off of repeated taps on the space bar?
Thanks.
_______________________________________________
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