fix(linux): add 'None' keyboard implementation for Wayland compositors#1300
Open
aasmall wants to merge 1 commit intocjpais:mainfrom
Open
fix(linux): add 'None' keyboard implementation for Wayland compositors#1300aasmall wants to merge 1 commit intocjpais:mainfrom
aasmall wants to merge 1 commit intocjpais:mainfrom
Conversation
3357c0a to
7cac7d7
Compare
Tauri Global Shortcut and Handy Keys both have reliability issues on Wayland (lost modifier state, missed keypresses, dynamic shortcut instability). Adds a 'None' variant that disables built-in hotkey handling so users can bind 'handy --toggle-transcription' in their compositor instead (e.g. Hyprland, Sway, KDE KWin). When 'None' is selected, the shortcut binding UI is hidden and replaced with a hint explaining the compositor keybind workflow.
7cac7d7 to
95df489
Compare
|
bump |
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.
Before Submitting This PR
Human Written Description
When running Handy on Arch/Omarchy/Wayland systems, none of the hotkey subsystems are compatible. Wayland compositor itself is effective, so suggesting a "none" keyboard shortcut option to disable both handykeys and Tauri.
Prior art and why this is still useful
Wayland keyboard shortcuts are an active area with multiple open PRs taking different approaches. I want to be explicit that this PR is complementary, not competing, with that work:
bind_shortcutsfor non-Flatpak apps" — so there are real compositors where it falls back to Tauri (which doesn't work on Wayland).Why "None" still has value when #1287 exists: The portal approach works where portals are implemented correctly. The "None" approach works anywhere the user can bind a keyboard shortcut to a command — which is every Wayland compositor on earth (Hyprland, Sway, Niri, River, COSMIC, KDE, GNOME, anything wlroots-based, etc.). These are complementary:
bind_shortcutsI'd be happy to defer to #1287 being merged first if @cjpais prefers — the two can coexist, and having "None" as a documented escape hatch for users where the portal doesn't work seems valuable regardless.
Related Issues/Discussions
Relevant to several open bugs around broken keyboard shortcuts on Linux/Wayland:
Changes
KeyboardImplementation::Nonevariant handled in all match arms (init, register, unregister, validate, parse, get)Noneis selected, the shortcut binding UI is hidden and replaced with a hint explaining compositor keybind setupshortcutsDisabledHintstring across all 19 non-English localesFiles changed: settings.rs (None variant + tests with local
settings_with_keyboard_overridehelper), shortcut/mod.rs (match arms + parse tests), bindings.ts, KeyboardImplementationSelector.tsx (platform-gated dropdown), GeneralSettings.tsx (hint when disabled), translation.json + 19 locale filesTesting
Ctrl+Shift+Space → handy --toggle-transcription) works reliably, no stuck statesAuto-triggered CI checks verified locally before marking ready:
cargo fmt --check,cargo test(newKeyboardImplementation::Noneparse + deserialize tests pass)bun run lint,bun run format:check(excluding upstream's pre-existing AGENTS.md prettier issue)bun run check:translations— all 20 languages have complete keysbun run test:playwright— passesScreenshots/Videos
AI Assistance
If AI was used: