Tab as default key press


#1
addDefaultKeypress ( KeyPress::tabKey, ModifierKeys::noModifiers );

produces ctrl + tab as the necessary key stroke.

How can I make it just be the tab key with no modifiers?


#2

There must be something else going wrong in your code, as this works fine here.

You can check it yourself, for example like this: fire up the Juce Demo, find this code,

result.setInfo ("Next Demo", "Shows the next demo in the list", demosCategory, 0);
result.addDefaultKeypress ('=', ModifierKeys::commandModifier);

And replace that second line with

result.addDefaultKeypress (KeyPress::tabKey, ModifierKeys::noModifiers);

If you now run JuceDemo, the tab key (without any modifiers) will allow you to jump to the next demo page...

works on Windows and OSX, didn't check Linux but I'd be surprised if that did something different


#3

You are correct. It works in the demo but in my app. I'll look into it.

Thanks