Responder problem
Responder problem
- Subject: Responder problem
- From: Ryan Stevens <email@hidden>
- Date: Thu, 2 Oct 2003 08:25:26 -0700
My problem is that while the Command key is pressed I don't receive
keyUp messages. What's weird is that Control and Option don't seem to
do the same thing.
I thought that maybe it was getting translated into a moveToEndOfLine:
or moveToBeginningOfLine: message somewhere but my responder never
receives those.
Here's the basics...
- (void)flagsChanged:(NSEvent *)event
{
if ([event modifierFlags] == NSCommandKeyMask) {/*...*/}
[super flagsChanged:event];
}
- (void)moveLeft:(id)sender { keyDown = YES; direction = NO; }
- (void)moveRight:(id)sender { keyDown = YES; direction = YES; }
- (void)keyUp:(NSEvent *)event { keyDown = NO; [super keyUp:event]; }
- (BOOL)animates
{ // If I missed a keyUp: message I animate needlessly. ugh!
return (keyDown);
}
- (void)animateOneFrame { /* Should only get here if a key is really
down.*/ }
Any ideas are welcome, I've been at this for several hours hunting for
a solution. TIA!
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.