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: Edward Hillenbrand <email@hidden>
- Date: Sat, 5 Feb 2005 13:09:34 -0700
On Feb 5, 2005, at 12:52 PM, Michael Swan wrote:
Just wondering if anyone knows how to use the space bar in key
equivalents, like iTunes for pause and play. I tried to type it into
the key equivalent field (didn't work) and it is not in the popup menu
either. Is this a private Apple trick that they don't share or just
poorly documented.
You have to fake it.
Subclass NSWindow and override -keyDown;, you could also subclass
NSApplication if you need it to work globally in you app.
Then in IB edit your menu item's title so it is something like "Play
space". Inset enough spaces between play and space so it looks good
and doesn't look like part of the menu title.
Now I know what you are thinking, "this can't be right." Well, open up
MenuBar.nib in the DVD Player bundle and you will see it for yourself.
-- Edward Hillenbrand
_______________________________________________
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