Skip to content

Add platform global shortcuts - #92

Draft
1bye wants to merge 11 commits into
mainfrom
codex/global-shortcuts-86
Draft

1bye wants to merge 11 commits into
mainfrom
codex/global-shortcuts-86

Conversation

@1bye

@1bye 1bye commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Adds platform().global_shortcuts() with UI-thread callbacks, visible conflict/native errors, owned registration handles, explicit unregister receipts, drop cleanup, and app-quit cleanup. Enable global-shortcuts, or tray which includes it.

macOS uses permission-free Carbon hotkeys and current-layout key mapping. Windows uses RegisterHotKey on a message-only window. Linux supports X11 passive grabs and Wayland GlobalShortcuts portals; missing hosts return Unsupported. Web/headless capability snapshots report unavailable support.

The tray example toggles its rich popup with Ctrl+Alt+K and displays/logs registration failures. Platform-service documentation covers permissions, keyboard layouts, portal approval, and lifecycle limits.

Closes #86

Validation run locally on macOS:

  • Rake format and Rake lint (zero diagnostics).

  • cargo test -p rake-shortcuts --locked (2 tests).

  • cargo run -p rake-shortcuts --example shortcut-probe --locked (registration, conflict, explicit unregister, drop and re-registration).

  • cargo test -p rake-app --features tray,view-test-support --lib platform::shortcuts --locked (1 UI dispatch/cancellation test).

  • cargo test -p rake-app --no-default-features --test platform --locked (6 tests).

  • cargo check -p rake-tray-example --locked.

  • Clippy with warnings denied for rake-shortcuts/all-targets and rake-app/tray/view-test-support/lib.

  • Local Wasm checks passed with default and tray features; Linux and Windows shortcut cross-target Clippy checks passed with warnings denied. These cross-target checks establish compilation, not runtime input behavior.

CI passed on e2c2056cc847e9f0bc57ed79b41b292cef80b377: gate, portable, both desktop jobs, windows-features, native, web-e2e and spacing. The scheduled-only extended job was skipped. Native lifecycle probes passed on macOS, Windows and isolated X11 CI. Windows message delivery uses a posted native message; it does not generate keyboard input.

Not verified: real physical key presses, cross-application focus/popup behavior, or Wayland compositor authorization and user-remapped bindings. No toolchains or system packages were installed. Work is isolated from the live checkout.

Merged origin/main as merge commit 9e5a509a413ec59af9c41fecc026ad68d1848e75, preserving file-drop coverage/docs and global-shortcut coverage/docs. Rake format, Rake lint (zero diagnostics), the file-drop JavaScript test and workflow YAML validation passed locally after the merge. CI for this merge head is pending.

🤖 Generated with Claude Code

1bye and others added 11 commits November 15, 2026 21:01
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add native registrations, UI dispatch, tray popup integration and lifecycle probes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cancel pending registrations at quit and verify queued UI callbacks stop after unregister.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Handle key-down events and exercise native event routing without keyboard input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 60-minute cap interrupted passing workspace doctests before the remaining view suites could run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preserve file-drop and global-shortcut coverage and documentation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Global shortcuts

1 participant