Re: Getting a NSMenuItem to respond to two different key equivalents
Re: Getting a NSMenuItem to respond to two different key equivalents
- Subject: Re: Getting a NSMenuItem to respond to two different key equivalents
- From: Uli Kusterer <email@hidden>
- Date: Fri, 12 Oct 2007 11:01:43 +0200
Am 12.10.2007 um 00:13 schrieb Adam Knight:
The NIBs are *not* using the nifty alternate item feature because
you can't do that with only shift, it seems (can't even check it
off in IB). I tried mangling in validateMenuItem but that's not
called unless the menu is being displayed, it seems. So where can
I flip the keyEquivalent as this happens, if that's what's
happening (the simplest solution).
Maybe I'm mixing this up with Carbon, but I think there's a way to
create an invisible menu. You could do that, put a second menu item
with the secondary shortcut in there, and hook that up just like the
first one.
Though, keep in mind that different keyboards have different
characters sharing a key. E.g. on a German keyboard, plus isn't on a
shifted key, and Plus with shift is the asterisk. OTOH, we usually do
what you're doing for the help menu item, because the question mark
is Shift-ß (German SZ ligature), so you can usually leave out the
shift key and still trigger the help menu item.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden