I imagine it’s a real simple problem, but I can’t find the reason of the problem.
In my application I can’t capture KeyPress with no ModifierKeys associated. My mac rises the sound to alert me that those are blocked (but, for example, KeyPress::F9Key is captured)
I capture those in getCommandInfo and as I show in follow lines the second doesn’t works:
result.defaultKeypresses.add(KeyPress(KeyPress::F2Key, ModifierKeys::commandModifier, 0)); // this works
result.defaultKeypresses.add(KeyPress(KeyPress::F2Key, ModifierKeys::noModifiers, 0)); // this DOESN'T works
result.defaultKeypresses.add(KeyPress(KeyPress::F9Key, ModifierKeys::noModifiers, 0)); // this works