OnKeyDown

I have been debugging VST3 plugins in a DAW on MacOS, specifically the PlugView.OnKeyDown and PlugView..OnKeyUp calls. I noticed that the VST3 plugin ignored these calls, returning kResultFalse for them. The keyboard events however did arrive in the plugin, probably directly from the OS into a plugin textedit box.

Can you please comment on this ? Where is this situation documented in the VST3 (or VST3GUI ??) docs ?

Specifically, how does the DAW know in this situation if the plugin wants to handle the keyboard event yes or no ? Actually, it says no, but does (indirectly) yes.

Sincerely,

Adriaan van Os

Hi,
on macOS the dispatching of keyboard events are well documented and follow a specific sequence (see Event Architecture).
So in the normal case if host and plugin do the right thing, the IPlugView::onKeyDown method is not needed on macOS.
On other operating systems where dispatching of keyboard events are only done to the focused view (like Windows) hosts have started to intercept the keyboard events early and call the IPlugView::onKeyDown method so that they know if a keyboard event was handled by the plug-in or not so that they can use the event for their own commands instead.

Hope this helps you.