Hi,
I’m creating shortcuts to activate fullscreen windows on the available displays on the users machine.
If they press command + shift + 1, they get a fullscreen window on the primary, 2 on the secondary etc.
However the code for OSX and Windows is different at this point, and i would like to fix it. On Windows i can use 1,2,3,4 as keys, and they will show up nicely in the menu as ‘ctrl + shift + 1’ etc.
On OSX when i use the same code i see the shortcuts displayed nicely like this:
[attachment=0]menu_osx_ok.png[/attachment]
But the shortcuts don’t work.
But if i use the ‘!’,’@’ keys the shortcuts do work (and that’s how have been using it for the last years) but they show up like this.
[attachment=1]menu_osx_wrong.png[/attachment]
Which i don’t like. Notice b.t.w that you don’t see the ‘!’ shortcut but that it does work
for (int i=0; i<DisplayOutputDevice::getNumDevices(); ++i)
{
//set up keypress for first 8 displays
#ifdef JUCE_MAC
const char characters[8] = {'!','@','#','$','%','^','&','*'};
#else
const char characters[8] = {'1','2','3','4','5','6','7','8'};
#endif
if (i < 8)
{
KeyPress keyPress(characters[i], ModifierKeys::commandModifier | ModifierKeys::shiftModifier, 0);
Menu::registerKeyPressForChoice(outputFullscreen.get(), i, keyPress);
}
}