Re: How do you use the space key as a key equivalent
Re: How do you use the space key as a key equivalent
- Subject: Re: How do you use the space key as a key equivalent
- From: Matt Neuburg <email@hidden>
- Date: Sat, 05 Feb 2005 12:47:56 -0800
On Sat, 5 Feb 2005 14:52:56 -0500, Michael Swan <email@hidden> said:
>Just wondering if anyone knows how to use the space bar in key
>equivalents, like iTunes for pause and play
What I do is simply catch the keypress and respond appropriately. There are
lots of ways and places to do this - you can catch keyDown: in the responder
chain (perhaps by inserting an extra object into the responder chain at the
appropriate place, perhaps by subclassing something), or you might implement
the window's sendEvent:, for example. I don't see any evidence in iTunes
that the space key is actually being routed thru the menu - the menu does
not flash - so I think iTunes probably does it just the same way I do it. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden