WebView (Windows): drop AllowHostInputProcessing + AcceleratorKeyPressed#29
Merged
Merged
Conversation
The host-input-processing route never actually got transport keys (Space, QWERTY) to the DAW: AllowHostInputProcessing only forwards WM_KEYDOWN to the WebView2's host HWND, which is JUCE's browser-host child window, not the DAW's plugin frame. JUCE's window proc dispatches to the focused component, not back up the HWND chain — so the key dies locally. Switching consumers (minimal_core) to a JS-side triage that explicitly PostMessages host-bound keys into the JUCE peer via a bridge capability, which routes through JUCE's standard key dispatch correctly. The Windows-side AllowHostInputProcessing + AcceleratorKeyPressed wiring is dead weight for that flow. Reverts the Windows half of "WebView: forward keys to host responder chain by default" (0f0a85e) and all of "WebView (Windows): query ICoreWebView2ControllerOptions4 for AllowHostInputProcessing" (edc9b04). macOS responder-chain forwarding stays — that path works and the new JS triage no-ops there. setEditableFocusActive remains in the public API and on the macOS backend; only the Windows override (which stored an unused atomic after this change) goes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The host-input-processing route never actually got transport keys (Space, QWERTY) to the DAW:
AllowHostInputProcessingonly forwardsWM_KEYDOWNto the WebView2's host HWND — which is JUCE's browser-host child window, not the DAW's plugin frame. JUCE's window proc dispatches to the focused JUCE component, not back up the HWND chain, so the key dies locally and never reaches the DAW.Switching consumers in
minimal_coreto a JS-side triage that explicitlyPostMessages host-bound keys into the JUCE peer's HWND via a bridge capability, which routes through JUCE's standard key dispatch correctly. The Windows-sideAllowHostInputProcessing+AcceleratorKeyPressedwiring is dead weight for that flow.What changes
WebView: forward keys to host responder chain by default) — removes theAcceleratorKeyPressedsubscription, theeditableFocusActiveatomic on the Windows backend, and thesetEditableFocusActiveoverrideWebView (Windows): query ICoreWebView2ControllerOptions4 for AllowHostInputProcessing) — removes theCreateCoreWebView2ControllerWithOptionspath and goes back to the plainCreateCoreWebView2ControllerThe macOS responder-chain forwarding (
WebBrowserComponent_mac.mm) stays — that path works correctly and the new JS triage no-ops there.setEditableFocusActiveremains in the publicWebBrowserComponentAPI and on the macOS backend; only the Windows override (which became dead weight) goes.Test plan
minimal_core's consumer-side PR: verify transport keys (Space) reach the DAW via the new JS triage path🤖 Generated with Claude Code