• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Responder problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Follow-Ups:
    • Re: Responder problem [flagsChanged cmd keyUp solved]
      • From: Ryan Stevens <email@hidden>
  • Prev by Date: PreferencePane and notifications
  • Next by Date: Notification and PrefPane-sorry
  • Previous by thread: PreferencePane and notifications
  • Next by thread: Re: Responder problem [flagsChanged cmd keyUp solved]
  • Index(es):
    • Date
    • Thread