Skip to content

Add a global shortcut to toggle all shortcuts - #1628

Open
steoty wants to merge 4 commits into
kando-menu:mainfrom
steoty:feature/921-toggle-shortcuts
Open

steoty wants to merge 4 commits into
kando-menu:mainfrom
steoty:feature/921-toggle-shortcuts

Conversation

@steoty

@steoty steoty commented Nov 24, 2026

Copy link
Copy Markdown

Fixes #921

This PR adds a keyboard shortcut for the tray menu entry "Temporarily disable all shortcuts", so that all shortcuts can be disabled and re-enabled without opening the tray menu.

Implementation by @hankkaa, tests by @steoty.

Changes

  • Toggle shortcut setting: New option toggleShortcutsShortcut (empty by default) in General Settings → Application Settings, directly below "Lazy initialization". It is only shown on platforms where Kando can register shortcuts itself (Windows, macOS and regular Linux).
  • Shared logic with the tray menu: The tray entry and the shortcut both use toggleShortcutInhibition(), and the tray label is always refreshed after toggling.
  • Backend: Backend now has a list of uninhibitable shortcuts (setUninhibitableShortcuts()). The toggle shortcut stays bound when all shortcuts are inhibited, so it can be used to re-enable them. If no toggle shortcut is set, the behavior is unchanged.
  • Toggle shortcut has priority: If it is identical to the menu shortcut, it toggles instead of opening the menu.
  • Settings migration fix: Development builds still report version 3.0.1, so the settings file was migrated again on load and the new setting was dropped after a restart (found during manual testing). toggleShortcutsShortcut is now preserved during migration, the same way it is done for the mouse button settings from Augment right and middle click behavior #956.
  • Added the English strings, type definitions and a changelog entry.

Tests

Unit tests (npm run test, plus lint, prettier and tscheck):

  • shortcut-inhibition.spec.ts: scenarios for the uninhibitable shortcuts, such as several exempt shortcuts, an empty list (unchanged behavior), repeated toggling, changing the list while inhibited, and combining individual inhibitions with "inhibit all".
  • general-settings-migration.spec.ts: the toggle shortcut survives loading files without a version, from 3.0.0, 3.0.1 and 3.1.0, as well as repeated save and load. Invalid and empty values are handled.
  • The migration tests were verified to fail without the fix (4 failing tests with the handling disabled) and to pass with it.
  • App.toggleShortcutInhibition() cannot be imported in mocha without Electron, so its logic is mirrored by a small helper in the test.

Manual tests (see the videos below):

Scenario Windows Linux macOS
Set the toggle shortcut, it is kept after reopening and restarting ✅ ✅ not tested
Toggle disables and enables the menu shortcut ✅ ✅ not tested
Tray label and toggle shortcut stay in sync (both directions) ✅ ✅ not tested
Typing text (e.g. Shift+A) works while shortcuts are disabled ✅ ✅ not tested
Toggle shortcut equal to the menu shortcut, rapid toggling, menu open ✅ ✅ not tested
Empty toggle shortcut and existing behavior ✅ ✅ not tested

I could not test on macOS manually. It would be great if someone with a Mac could try it.

Screenshots

kando-toggle-shortcut
kando-toggle-shortcut.mp4

@Schneegans

Copy link
Copy Markdown
Contributor

Thank you guys very much. It works like a charm! I hope that I'll have the chance to test this later today on macOS. But I am pretty sure that it will work!

@hankkaa

hankkaa commented Nov 30, 2026

Copy link
Copy Markdown

Thank you so much for testing it! Let us know if anything comes up on macOS, we're happy to adjust it.

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.

Add global hotkey for enabling/disabling all Kando shortcuts

3 participants