Okay, here a pretty specific situation:
-Press and hold a key (for instance s), a KeystateChanged callback will be made.
-Now press and hold cmd (a ModifierKeysChanged callback will be made)
-If you now release the s, no keyup will be registered, unless the s is pressed again.
What would seem logical to me is that all keys down are cleared when pressing a modifier key. At least, this solves the problems this behavoir causes in our App. If the cmd + s shortcut is made in the normal sequence (first cmd, then s), all goes well.
It modified the juce_mac_NSViewComponentPeer.mm file a bit:
void NSViewComponentPeer::redirectModKeyChange (NSEvent* ev)
{
// first clear all keys down
keysCurrentlyDown.clear();
// now handle callbacks
handleKeyUpOrDown();
// proceed as usual (original code)
updateModifiers (ev);
handleModifierKeysChange();
}
Does this seem like the way to go, or is there perhaps a more elegant solution?
Cheers,
Tim