Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can menu item key equivalents using characters requiring shifting be easily set without the shift modifier in IB?

The set-up:

In Interface Builder 3.2.5, when you set a key equivalent for a menu item using a character that is typed using a shift key (e.g. the question mark), the key equivalent is set to the unshifted character on the same key with the shift modifier as part of the key equiv. For example, trying to set the key equiv. to Command-Question Mark sets it as Command-Shift-Forward Slash.

The various system U.S. and Dvorak layouts, the Unicode Hex Input, British and Canadian English layouts and my custom Dvorak layout all exhibit this behavior.

The question:

How can an equiv be easily set to a character requiring use of a shift key without including the shift modifier as part of the equiv?

The workarounds:

It could be done by switching to a keyboard layout where you can type the desired character without using shift. It could also be done by editing the nib file containing the menu. However, neither of these has the level of ease I desire. It could be done programmatically, but (for the purposes of this question) I'm only interested in how it could be done in IB.


So far, the Apple docs and web searches have turned up naught. If any resource online answers this question, please let me know.
like image 356
outis Avatar asked Feb 27 '11 21:02

outis


1 Answers

In IB 3 you the button should allow you to click the arrows to pop up a menu after you type something that is an alternate. IB3 Picture

In Xcode 4 it is more apparent as you type in ⇧⌘/ it has a drop down Alternates that lets you pick ⌘?

Xcode Picture

like image 183
jbtule Avatar answered Nov 03 '22 15:11

jbtule