Add explicit WebView accelerator delivery#51
Merged
satoshi-szk merged 2 commits intoJul 23, 2026
Merged
Conversation
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
marked this pull request as ready for review
July 23, 2026 09:24
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
PlatformDefaultandKeyEventdelivery contracts for WebView acceleratorsWhy
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:orkeyDown: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 --checkcargo test -p wry -p wxpcargo clippy -p wry -p wxp --all-targetscargo check -p wry -p wxp --target x86_64-pc-windows-msvc