{{ message }}
feat(desktop): make the toggle-window global shortcut customizable - #2040
Merged
eleboucher merged 4 commits intoSep 6, 2026
Merged
Conversation
Surface the global show/hide window shortcut in Settings → Keyboard Shortcuts under a new Global section (desktop only). The shortcut is off by default; users can bind any key combination or disable it entirely. Bindings persist through the new set_toggle_window_shortcut command and are re-registered at startup. OS-registered shortcuts collide with bindings in every scope, since the OS intercepts key presses before the webview sees them.
global-hotkey has no Wayland backend: its X11 grab lives in XWayland and only sees key presses while an X11 window is focused, so registration succeeds silently but never fires on Wayland. Refuse the binding with an explanatory error on Linux when WAYLAND_DISPLAY is set, and surface the backend error message verbatim in the shortcuts UI instead of a generic fallback.
…ding The Keyboard Shortcuts page now leads with the in-app sections and places Global last, with its system-wide explanation as a caption under the Global heading. Reword the intro to say "App-wide" instead of "Global" shortcuts, since Global now names a section whose shortcuts do run while typing.
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.

Description
Surface the global show/hide window shortcut in Settings → Keyboard Shortcuts under a new Global section (desktop only, listed last). The binding is now user-configurable like every other shortcut: rebindable, clearable (Backspace or Reset disables it), and persisted in
desktop-preferences.jsonvia the newset_toggle_window_shortcutcommand, which registers/unregisters the OS accelerator and re-registers it at startup.DesktopRuntimeStatereports the live binding to the webview.Motivation: the accelerator was previously hardcoded (
CmdOrCtrl+Shift+S), invisible in the shortcuts UI, and always on. It is now off by default, an intentional behavior change, and OS-level bindings conflict-check against every scope, since the OS intercepts the combo before the webview sees it. Registration failures surface inline, including a clear refusal on Wayland sessions (theglobal-hotkeycrate is X11-only; its XWayland grab cannot intercept compositor key events).No new dependencies.
Verification:
cargo test --lib(138 passed),pnpm typecheck,pnpm test -- --run(3244 passed),pnpm lint, all clean.Type of change
Checklist:
AI disclosure:
Converts existing hotkey format to Tauri's OS-level hotkey format, persists these OS-level/desktop-only preferences in
desktop-preferences.json. Warns on edit when on Wayland session as these Global keybinds aren't supported from Tauri's side. Adds a newGlobalcategory taggeddesktopOnly(does not show on Web or Mobile, obviously).