Re: Space bar for key equiv or detecting space bar push?
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.