Skip to content

Warn before reusing a keyboard shortcut that's already taken - #446

Merged
kitknox merged 5 commits into
kitknox:mainfrom
jvanderen1:feat/keybind-conflict-override
Sep 13, 2026
Merged

kitknox merged 5 commits into
kitknox:mainfrom
jvanderen1:feat/keybind-conflict-override

Conversation

@jvanderen1

@jvanderen1 jvanderen1 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Recording a shortcut another action already uses shows a warning instead of silently stealing it. You can Unbind [the other action], Edit [the other action] Instead (same sheet), or Cancel.
  • Override unbinds the previous owner so it stays empty (Unbound). The action you are editing keeps the new shortcut.
  • While recording, menu key equivalents are paused so chords like ⌘T reach the editor. Conflict checks use the live binding table. ⌘. still uses the reserved Send Escape menu item.

Test plan

  • Record a free shortcut — it saves immediately, no warning.
  • Record a taken shortcut (for example ⌘T while New Tab owns it) — Shortcut Already in Use, not a new tab.
  • Unbind [action] — the new action shows the shortcut; the old one is Unbound / No Shortcut.
  • Bounce Edit [action] Instead a few times, then unbind — only the current action updates; the other stays unbound.
  • Cancel leaves bindings unchanged.
  • After recording, menu shortcuts (⌘T, etc.) work again.

Screencast

Update.Shortcuts-gh.mp4

@jvanderen1
jvanderen1 marked this pull request as ready for review September 13, 2026 05:30
@kitknox

kitknox commented Sep 13, 2026

Copy link
Copy Markdown
Owner

This doesn’t build as it seems to depend on changes in your other pending PRs. Either need to rebase directly on main or we need to get through the other PRs first. I had replied to the one in the queue a few days back I believe.

jvanderen1 and others added 4 commits September 13, 2026 11:03
Recording a chord that another action already owns used to succeed silently, so users couldn't tell who held a shortcut or that the old binding would disappear.

Co-authored-by: Cursor <cursoragent@cursor.com>
A hardcoded list of menu selectors would drift whenever a new File or View shortcut is added; clearing MenuShortcutState during capture lets the editor see the physical chord from the live binding table instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
Stealing a chord used to leave a stale remap or wipe the new binding; the old action now stays unbound and the new one keeps the shortcut.

Co-authored-by: Cursor <cursoragent@cursor.com>
The editor API on main already takes a profile parameter and a single-argument outcome; restore those so this branch builds without the mux PRs.
@jvanderen1
jvanderen1 force-pushed the feat/keybind-conflict-override branch from 281569d to f4b8d80 Compare September 13, 2026 17:45
@jvanderen1

Copy link
Copy Markdown
Contributor Author

I just fixed this PR. Will take a look at your comment on #433. Thanks!

Require switch-aware parents for in-sheet action changes. Check new profile shortcuts against existing profiles and persist targeted unbinds for displaced parameterized bindings.
@kitknox
kitknox merged commit 7b5f7f5 into kitknox:main Sep 13, 2026
@jvanderen1
jvanderen1 deleted the feat/keybind-conflict-override branch September 13, 2026 18:16
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