Skip to content

Add explicit WebView accelerator delivery#51

Merged
satoshi-szk merged 2 commits into
novonotes:novonotes-internalfrom
satoshi-assistant:codex/fix-webview-accelerator-input
Jul 23, 2026
Merged

Add explicit WebView accelerator delivery#51
satoshi-szk merged 2 commits into
novonotes:novonotes-internalfrom
satoshi-assistant:codex/fix-webview-accelerator-input

Conversation

@satoshi-assistant

Copy link
Copy Markdown
Contributor

Summary

  • separate regular key-event routes from accelerator routes
  • add explicit PlatformDefault and KeyEvent delivery contracts for WebView accelerators
  • dispatch macOS standard editing shortcuts through responder actions while keeping an opt-in DOM key event path
  • preserve the original WebView2 message path on Windows and retain the existing re-entry guards
  • document the breaking keyboard-routing API

Why

Embedded WebViews need two different accelerator behaviors. Text editing shortcuts must preserve the platform WebView's standard actions, while application-defined shortcuts need a DOM key event. A single macOS performKeyEquivalent: or keyDown: path cannot provide both contracts: the former can keep custom shortcuts out of the DOM, while the latter does not execute WebKit's standard editing actions and may bounce through the responder chain.

Making the delivery contract explicit keeps this distinction platform-neutral for callers and prevents the earlier accelerator re-entry protection from being removed.

Validation

  • cargo fmt --all --check
  • cargo test -p wry -p wxp
  • cargo clippy -p wry -p wxp --all-targets
  • cargo check -p wry -p wxp --target x86_64-pc-windows-msvc

Separate regular key routing from accelerator delivery so embedded WebViews can preserve native editing actions or opt into DOM key events without reintroducing accelerator re-entry.
Release Windows routing borrows before native dispatch and keep macOS PlatformDefault on WKWebView's key-equivalent path while normalizing Caps Lock for standard editing actions.
@satoshi-szk
satoshi-szk marked this pull request as ready for review July 23, 2026 09:24
@satoshi-szk
satoshi-szk merged commit 0998060 into novonotes:novonotes-internal Jul 23, 2026
8 checks 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.

2 participants