Doesn’t seem to work.
Tab is listed as a keypress, not a modifier, but if I do:
addDefaultKeypress(KeyPress::spaceKey, 0);
the command triggers, whereas
addDefaultKeypress(KeyPress::tabKey, 0);
never fires.
Doesn’t seem to work.
Tab is listed as a keypress, not a modifier, but if I do:
addDefaultKeypress(KeyPress::spaceKey, 0);
the command triggers, whereas
addDefaultKeypress(KeyPress::tabKey, 0);
never fires.
Perhaps it’s getting intercepted and used to move the keyboard focus between components…?
hmm, yeah, that’s probably true.
I wasn’t really thinking about tab focus, cos it’s not applicable to my interface.
Nothing is ever simple.
How about this change, in ComponentPeer, 462:
if (keyInfo.isKeyCode (KeyPress::tabKey) && Component::getCurrentlyFocusedComponent() != 0)
{
Component* const currentlyFocused = Component::getCurrentlyFocusedComponent();
currentlyFocused->moveKeyboardFocusToSibling (! keyInfo.getModifiers().isShiftDown());
keyWasUsed = (currentlyFocused != Component::getCurrentlyFocusedComponent());
break;
}
…it just adds a check to see if the focus actually changed, and if not, it shouldn’t consume the key event.
I’ll give it a try.
Thanks Jules.