While running my plug-in in Wavelab (8.0.3 on Windows, 32-bit and 64-bit) I noticed that if the plug-in is in focus and you hit the space bar to start/stop the audio playback the host appears to receieve the message twice. This results in playback maintaining the state it was in before (i.e. doesn't start or doesn't stop), but when it is playing the playback start marker updates it's position, which is what makes me think the message is getting through twice.
I have tested this with the audio plug-in demo from the latest Git commit (4a37aa0) and with other comercially released plug-ins (including PPMulator), which all show the same bug. I have also tested on Mac (same Wavelab version) and the bug does not exhibit there.
I can only assume that other key commands are also being doubled, but the space bar is the only one which is obvious enough to demonstrate the issue.
Ah Wavelab.. the biggest PITA of all the hosts. Presumably it's sending keypresses to the plugin's window, which would make the win32 hooks that are normally needed unnecessary.
My wavelab license expired some time ago, but could you see whether it works if you make this change, in juce_WindowsHooks.h, line 48 ?
I have attached two screen prints of the call stacks when hitting the spacebar (it didn't help that Wavelab seems to call this function constantly...). As you can see the first call does go through Juce but the second call seems to come straight from the host.
Also of note is that when I added back in the fix you suggested before and tried to break in the same place I found that the keyboardHookCallback function isn't getting called at all, yet the problem remains...
If you'd used my suggested fix, then it would be impossible for that second call to arrive, because the hook function would never have been registered. Perhaps try the fix again, and step through it to see why it's not working?
I have a project whose release is imminent and would like to get this issue sorted if possible.
I have just taken another look at this using the latest release of WaveLab (8.5.10) and it is still a problem. Removing the keyboard hooks as you first suggested does stop the calls arriving at keyboardHookCallback() but pressing the space-bar (when audio is playing) still pauses and then resumes playback almost instantaneously.
Is there any chance you could take a second look at this?
We have the same problem in our plugin and we found out that the problem appears in the JuceDemoPlugin, too. So it seems to be a bug in the juce code and I don't know where I should search for it.