Skip to content

Add configurable keyboard event routing#48

Merged
satoshi-szk merged 2 commits into
novonotes:novonotes-internalfrom
satoshi-assistant:codex/keyboard-routing-cleanup
Jul 4, 2026
Merged

Add configurable keyboard event routing#48
satoshi-szk merged 2 commits into
novonotes:novonotes-internalfrom
satoshi-assistant:codex/keyboard-routing-cleanup

Conversation

@satoshi-assistant

Copy link
Copy Markdown
Contributor

Summary

  • replace the key-only keyboard route list with explicit defaults for key events and accelerators
  • add modifier-aware keyboard chords for wxp and native routing support in macOS/WebView2 backends
  • keep child WebView parent-routed events from re-entering the wrapper before reaching the host view
  • avoid unstable let-chain syntax in run_loop so the workspace builds on the current stable toolchain

Why

Embedded plugin UIs need WebView-owned shortcuts such as primary-modifier undo/redo to stay inside the WebView while selected host keys such as Space can still reach the parent host view. A key-only route list made that behavior ambiguous, especially for command-key paths on macOS.

Validation

  • cargo fmt
  • cargo check -p wry
  • cargo check -p wxp
  • cargo test -p wxp keyboard --lib
  • cargo check -p wry --target x86_64-pc-windows-msvc
  • cargo check -p wxp --target x86_64-pc-windows-msvc
  • git diff --check

Route key events and accelerator-style shortcuts through an explicit policy so embedded WebViews can keep application shortcuts while forwarding selected host keys. The policy replaces the older key-only route list and keeps the WebView2/macOS backends aligned.
Child WebViews rely on the wrapper for AppKit accelerator routing. Reparenting only the inner WKWebView would bypass that wrapper after moving the view to another window.
@satoshi-szk
satoshi-szk marked this pull request as ready for review July 4, 2026 10:12
@satoshi-szk
satoshi-szk merged commit 36068ec into novonotes:novonotes-internal Jul 4, 2026
4 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