We use keyboard modifiers with the arrow keys to allow a user to specify how much a control should move with each press of the arrow key. This works great with JUCE plugins in other hosts, but for some reason, it doesn’t work in Pro Tools, and we never get the arrow key press when the command key is held down.
I considered the possibility that Pro Tools just gobbles that event, but that’s not the case in our non-JUCE plugins. Any idea what’s going on?
I’m not sure there’s much we can do here as the key press is getting consumed by Pro Tools before it ever reaches the ComponentPeer key handling code as PT uses CMD+arrow keys to start and stop the transport.
Relying on key modifiers which might be consumed by the host for behaviour in your plug-in is a bit flaky - I’ve tested a few DAWs/formats with CMD+arrow keys and found that whilst some hosts like Bitwig will pass these events through, others like Reaper and Pro Tools will not. Cubase for example will consume CMD+left/right keys but not CMD+up/down.
Are these doing any non-standard keyboard hooks or just relying on the OS keyboard callbacks?
In REAPER, with the “Send all keyboard input to plugin” option turned on the Command + Arrow Key shortcut works fine. I understand that these aren’t necessarily the most reliable shortcuts, but it’d be nice if the DAW’s would give us the first shot at handling them when we have keyboard focus since it makes it possible to operate our plugins completely mouse-free.
I believe we were just overriding the NSWindow or NSView events, no special keyboard hooks.
I did notice that for getWin32Modifiers() in the AAX wrapper you’re handling shift and alt mods but not ctrl. I assume that that would only affect Windows, though.