Command shortcuts


#1

Is there a way to get more Mac-like menu shortcuts?
The demo has text like “command + 1” and I’d like to use the
Macintosh clover symbol instead of the word “command”


#2

Isn’t the mac symbol the ‘Command’ command?


#3

If you look at the code from the Mac demo project, in getCommandInfo:

 case showPathsAndTransforms:
            result.setInfo (T("Paths and Transforms"), T("Shows the paths & transforms demo"), demosCategory, 0);
            result.setTicked (currentDemoId == showPathsAndTransforms);
            result.addDefaultKeypress (T('1'), ModifierKeys::commandModifier);
            break;

the keyboard shortcut in the menu comes up as “Command + 1”, and on the Mac this is usually written as “C1” where “C” is the special clover symbol that stands for the command key and looks like this:
http://en.wikipedia.org/wiki/Command_key

Similarly, there are special symbols for option, control and shift that appear in Mac menus that would be nice to have appear automagically. This may mean that the choice of font for the menus is restricted to the same one that Apple uses (at least for the special characters).


#4

Ah, you mean the actual font, that would make sense then, yes.


#5

Would require some hackery in the menu class, but it’s not impossible. Haven’t time to look at it at the moment, though.


#6