Skip to content

WebView (Windows): drop AllowHostInputProcessing + AcceleratorKeyPressed#29

Merged
jakepenn merged 1 commit into
minimal_masterfrom
webview-win-drop-input-passthrough
May 26, 2026
Merged

WebView (Windows): drop AllowHostInputProcessing + AcceleratorKeyPressed#29
jakepenn merged 1 commit into
minimal_masterfrom
webview-win-drop-input-passthrough

Conversation

@jakepenn

Copy link
Copy Markdown
Member

Summary

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 JUCE component, not back up the HWND chain, so the key dies locally and never reaches the DAW.

Switching consumers in minimal_core to a JS-side triage that explicitly PostMessages host-bound keys into the JUCE peer's HWND 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.

What changes

The macOS responder-chain forwarding (WebBrowserComponent_mac.mm) stays — that path works correctly and the new JS triage no-ops there. setEditableFocusActive remains in the public WebBrowserComponent API and on the macOS backend; only the Windows override (which became dead weight) goes.

Test plan

  • Verify the plugin form still loads and the WebView2 renders normally
  • Verify keyboard works in DOM inputs (typing into preset search etc.)
  • In minimal_core's consumer-side PR: verify transport keys (Space) reach the DAW via the new JS triage path

🤖 Generated with Claude Code

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>
@jakepenn jakepenn merged commit 2c77216 into minimal_master May 26, 2026
1 check passed
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