Skip to content

Remove shortcuts from the Shortcuts page: a key at a time, a section, or all - #2953

Open
brhellman wants to merge 41 commits into
Foundry376:masterfrom
brhellman:shortcut-remove-keys
Open

brhellman wants to merge 41 commits into
Foundry376:masterfrom
brhellman:shortcut-remove-keys

Conversation

@brhellman

@brhellman brhellman commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

The Shortcuts page can add keys (#2952) but not take them away. The only way to clear a bad key, or turn shortcuts off, is to hand-edit keymap.json, which the page never explains (#170), and until #2950 even that couldn't remove a key. Someone who wants just a few shortcuts has to undo dozens.

  • × on each key removes it. Keys are chips now, so each × sits on its own key. Every other spelling of the same key goes too: a template may list mod+a beside ctrl+a, which the row already shows as one key on Windows and Linux (pressedKeys, withoutBinding).
  • Reset shows on a command the user keymap sets and deletes that entry, which brings back the template's keys.
  • Clear on each section heading sets every command in the section to [].
  • Clear All beside Restore Defaults does it for every command on the page, after a confirmation that says how to get keys back (+ or Restore Defaults). Then add back the few you want.
  • A command with no keys reads "None", now localized. Other entries in keymap.json are kept, since clearedKeymap copies them.

Stacked on #2952 (recording with +, which it shares CommandItem, user-keymap.ts and the row styles with) and #2950 ([] unbinds), so the diff shows both until they land.

Verified: shortcut-removal-spec covers the helpers (mod on each platform, both spellings removed on Windows/Linux and only one on macOS, clearing without touching other entries or the input), a mounted CommandItem against a temporary keymap.json (× keeps the other keys, the last × leaves [], the mod/ctrl pair shown and removed as one key, None, Reset only when customized and not while recording, Reset deleting the entry), and a mounted PreferencesKeymaps (a section's Clear clears that section and keeps other entries, Clear All confirmed and cancelled, and Reset following the file through a keymap reload). Every statement and condition added was mutated: 23 of 23 red. Live, in this branch's build on a copy of a Gmail-template config (Electron 44.5.1, DevTools mouse input): × on Archive's E left None with {"core:archive-item": []} and no binding. Reset brought E back with {}. Clear on Actions set every Actions command to None and left Application alone. Clear All (confirmed) set every row to None. Lint, prettier and tsc clean; full suite 2467 passing on this branch (master 4ebb582fb + #2950 + #2952).

Shortcuts page series (one concern each; merge in this order): #2950 [] unbinds, #2951 mail held behind Preferences, #2952 record with +, #2953 remove keys, #2955 conflict warnings, #2956 visual pass, #2957 search, #2958 single-key switch, #2959 Show filter.

🤖 Generated with Claude Code

Brian Hellman and others added 4 commits October 7, 2026 20:59
KeymapFile created a command's entry only while pushing its first keystroke, so `[]` left no
entry and the template's keys stayed bound: there was no way to remove a shortcut, even by
editing the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recording began whenever a row took focus and ended on its own, a single plain key could not be
recorded (the row waited for a second one and saved "k then j"), and the result replaced every
key the command had. Recording now starts from a + button and says so; a modifier combination
ends it at once, a plain key after Mousetrap's one-second sequence timeout; Esc cancels; the
key joins the command's existing ones; focus returns to the button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… or all

Each key is a chip with an x that removes it (and any other spelling of the same key), a
command the user keymap changed gets a Reset back to the template, each section has a Clear,
and Clear All (confirmed) empties every command. A command left with no keys is written as
`[]`, which unbinds it. "None" is localized now that it shows on cleared commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@brhellman

Copy link
Copy Markdown
Contributor Author

The Shortcuts page work continues in five follow-ups stacked on this one, each a single concern:

The whole series (#2950–#2959) has been running in my daily build on a live account. Merge order is listed at the bottom of each PR.

🤖 Generated with Claude Code

Brian Hellman added 17 commits October 10, 2026 06:34
Brian Hellman added 20 commits October 26, 2026 07:20
…licitly

# Conflicts:
#	app/lang/en.json
#	app/lang/hu.json
#	app/lang/pt.json
# Conflicts:
#	app/lang/en.json
#	app/lang/hu.json
#	app/lang/pt.json

This branch has not been deployed

No deployments
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.

1 participant