Hi - I am using juce 1.39 on OSX.4

I have set up a ApplicationCommandTarget and am trying to assign default keypresses to the commands. When the keypress involved the command key all works as expected :

result.addDefaultKeypress(T(‘E’), ModifierKeys::commandModifier);

however, when i attempt to assign to a key combo with either alt or control key, it does not respond.

result.addDefaultKeypress(T(‘E’), ModifierKeys::ctrlModifier);

When I print out what I am typing using the keyPressed method for TextEditor I it seems to be key 69 and modifier 2. So I plugged in that keycode and still nothing.

result.addDefaultKeypress(69, ModifierKeys::ctrlModifier);

could anyone help me out on this. i am clearly missing something simple here.


Sounds like you’re doing the right thing. Could be a mac keyboard mapping glitch, it can be a bit hairy trying to tell the difference between an alt-letter keystroke and the extended character that it would produce when you press it. I’ll check that one out next time I’m on the mac.