• 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
Re: Space bar for key equiv or detecting space bar push?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Space bar for key equiv or detecting space bar push?


  • Subject: Re: Space bar for key equiv or detecting space bar push?
  • From: Greg Robbins <email@hidden>
  • Date: Mon, 14 Jun 2004 16:35:05 -0700

At 4:13 PM -0700 6/14/04, email@hidden wrote:
Greetings i'm working on a basic movie player and would like to have it work like quicktime does when playing and pausing the movie but i can't seem to set the space bar as a key equive how would i detect when its pushed?

If there's no other first responder, your window controller should see it:

- (void)keyDown:(NSEvent*)theEvent
{
NSString* keysPressed = [theEvent characters];
if ( [keysPressed hasPrefix:@" "] )
{
// spacebar pressed
}
}


Greg Robbins
_______________________________________________
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.


References: 
 >Space bar for key equiv or detecting space bar push? (From: email@hidden)

  • Prev by Date: Re: Is that really a bug at all? (was: Re: Ugly bug in Foundation, beware!)
  • Next by Date: Image Alignment In Scrolled View?
  • Previous by thread: Space bar for key equiv or detecting space bar push?
  • Next by thread: Image Alignment In Scrolled View?
  • Index(es):
    • Date
    • Thread