Skip to content

Fix keyboard shortcuts and vault menu on Windows/Linux#104

Merged
an0nn30 merged 2 commits into
mainfrom
fix/cross-platform-shortcuts-and-vault-menu
Apr 5, 2026
Merged

Fix keyboard shortcuts and vault menu on Windows/Linux#104
an0nn30 merged 2 commits into
mainfrom
fix/cross-platform-shortcuts-and-vault-menu

Conversation

@an0nn30

@an0nn30 an0nn30 commented Apr 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Keyboard shortcuts broken on Windows/Linux: Config shortcuts use cmd+ prefix which maps to Meta on macOS but was not being translated to Ctrl on Windows/Linux. Fixed in both titlebar.js (parseShortcut) and shortcut-runtime.js (normalizeShortcutString). Also removed the Mac-only guard on the core shortcut fallback handler.
  • Command palette double-fire: Both the shortcut-runtime handler and titlebar accelerator matched Ctrl+Shift+P, causing the palette to open then immediately close. Added stopImmediatePropagation() to the shortcut-runtime handler.
  • Vault menu items missing from Windows/Linux titlebar: Credential Vault, Generate SSH Key, and Lock Vault were only in the native macOS menu. Added them to the custom titlebar buildMenuDef() Tools menu.

Test plan

  • On Windows: verify Ctrl+T, Ctrl+W, Ctrl+Shift+N, Ctrl+Shift+M, Ctrl+Shift+V and other shortcuts work
  • On Windows: verify Ctrl+Shift+P opens/closes the command palette (no double-fire)
  • On Windows: verify Credential Vault, Generate SSH Key, and Lock Vault appear under Tools menu
  • On macOS: verify all shortcuts still work via native menu accelerators
  • On Linux: verify shortcuts and vault menu items work (same custom titlebar as Windows)

- titlebar.js parseShortcut: treat "cmd" as Ctrl on non-Mac (was
  requiring Meta/Win key, which users never press for shortcuts)
- shortcut-runtime.js normalizeShortcutString: map "cmd" config prefix
  to "ctrl" on Windows/Linux so fallback shortcuts match key events
- shortcut-runtime.js: remove Mac-only guard on core shortcut handler
  so Ctrl-based shortcuts fire on all platforms
- shortcut-runtime.js: add stopImmediatePropagation to command palette
  handler to prevent double-fire with titlebar accelerator
- titlebar.js buildMenuDef: add missing Credential Vault, Generate SSH
  Key, and Lock Vault items to the Tools menu

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 354452aef9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/conch_tauri/frontend/app/ui/titlebar.js

an0nn30 commented Apr 5, 2026

Copy link
Copy Markdown
Owner Author

Addressed this by deduplicating plugin shortcut handling in custom-titlebar mode.

What changed:

  • In titlebar.js registerAccelerators(), plugin menu items (id starting with plugin.) are now excluded from titlebar accelerator bindings.
  • Plugin keybinds continue to be handled by shortcut-runtime fallback (pluginAllShortcutFallbacks), which avoids double-dispatch of trigger_plugin_menu_action.

Commit: 04f5119

@an0nn30 an0nn30 merged commit 93848ab into main Apr 5, 2026
5 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