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: daniel <email@hidden>
- Date: Sat, 5 Feb 2005 12:27:27 -0800
That is pretty cheezy. I was about to go on about how this is another
area where Carbon's menu manager is better than Cocoa, but I just
tested it out by passing kMenuSpaceGlyph to Carbon's
SetMenuItemKeyGlyph. It works at least, but it renders space as, well,
a space! (" ")... this looks decidedly bad in a menu.
Daniel
On Feb 5, 2005, at 12:09 PM, Edward Hillenbrand wrote:
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:
sweater.com
This email sent to email@hidden
_______________________________________________
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