Skip to content

VST3: forward onKeyDown/onKeyUp through a wrapper extension - #581

Closed
mkruselj wants to merge 1 commit into
free-audio:nextfrom
mkruselj:vst3-keyboard-extension
Closed

mkruselj wants to merge 1 commit into
free-audio:nextfrom
mkruselj:vst3-keyboard-extension

Conversation

@mkruselj

@mkruselj mkruselj commented Oct 2, 2026 •

Copy link
Copy Markdown

Some hosts take the keyboard off a plugin's window and offer keys through IPlugView instead, which is the only way a plugin sees them there. CLAP has no key event to forward those to, by design, so WrappedView's onKeyDown() and onKeyUp() were stubs returning kResultFalse and a wrapped VST3 could not have keyboard shortcuts at all.

Adds CLAP_PLUGIN_AS_VST3_KEYS, a plugin extension beside the wrapper's existing clap-wrapper-specific ones, carrying IPlugView's own arguments: the character the key produced, a VirtualKeyCodes value for a key that produced none, and KeyModifier bits. WrappedView queries it and reports kResultTrue only when the plugin says it used the key, so a host's own key handling is not blocked. A plugin that does not implement the extension behaves exactly as before.

Assisted-By: Claude Opus 5 noreply@anthropic.com

Some hosts take the keyboard off a plugin's window and offer keys through
IPlugView instead, which is the only way a plugin sees them there. CLAP
has no key event to forward those to, by design, so WrappedView's
onKeyDown and onKeyUp were stubs returning kResultFalse and a wrapped
VST3 could not have keyboard shortcuts at all.

Adds CLAP_PLUGIN_AS_VST3_KEYS, a plugin extension beside the wrapper's
existing clap-wrapper-specific ones, carrying IPlugView's own arguments:
the character the key produced, a VirtualKeyCodes value for a key that
produced none, and KeyModifier bits. WrappedView queries it and reports
kResultTrue only when the plugin says it used the key, so a host's own key
handling is not blocked. A plugin that does not implement the extension
behaves exactly as before.
@mkruselj

mkruselj commented Oct 2, 2026

Copy link
Copy Markdown
Author

Found a different way to make this work, using JUCE's hwnd listener method. Extension not needed, so closing the PR.

@mkruselj mkruselj closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant