I just grabbed the latest version on Master for this last test. You should also probably test with Tracktion Waveform, since that’s a DAW made with JUCE, which you can debug (at least the examples of the engine).
Also, you should really check that the plugin you’re testing is indeed not consuming spacebar.
If the exact same plugins work correctly in Ableton Live (i.e. Ableton reacts correctly to Spacebar presses by starting/stopping the song playback once I’ve tweaked the pluging knobs/sliders) isn’t that proof that those plugins aren’t consuming the Spacebar?
One difference I see in AudioPluginHost application is that it seems to be using ARAPlugins. I’m not 100% sure this is always the case, because the application code isn’t the easiest to follow as there’s tons of code in there. But are you also using ARAPlugins instead of VST3 plugins? I assume that ARAPlugin wraps the other plugin formats inside itself?
I think if you want to get to the bottom of the problem you’re experiencing, you should test, and not assume. For example, by creating a JUCE example plugin and debugging it.
I’m not using ARA. Regular VST3 plugin.
BTW, one of the things to also is test is if the plugin indeed consumes spacebar when doing things such as saving the preset from the UI of the plugin - that would show that the plugin is indeed handling consuming/non consuming of the spacebar button correctly.
When they both always returned FALSE, both my own application and Ableton Live reacted to key presses all the time.
When they both always returned TRUE, both my own application and Ableton Live did not react to any of my key presses until I clicked outside the plugin window.
In my own application the ComponentPeer::handleKeyPress() wasn’t called when I returned TRUE and the plugin GUI had keyboard focus. Exactly as it should be.
So the question remains: why doesn’t my own application receive key presses when third party plugin’s GUI has keyboard focus, while Ableton Live does receive those exact same key presses and reacts to them correctly?
So, if I understand you correctly, both your own host and Ableton Live worked correctly with the plugin you created, but a problem occurs only when loading specific plugins?
That could potentially mean that JUCE hosting has a bug with some very specific plugins. You can easily confirm that by installing a professional DAW made in JUCE, like Tracktion Waveform.
If indeed the bug happens there, perhaps you can file a bug report with reproduction steps and the exact plugins you’ve used.
I just tested this with Tracktion Waveform and it also presents this very same issue. So it’s a bug in JUCE. What’s the proper way of reporting JUCE bugs? Do I just post a new post in these forums with “BUG REPORT” in the topic, or is there some other place bug reports should be sent to?