Repository navigation
After I rebind a key, F1 still shows the old one, and keys I've added never appear there #497
Description
Opportunity
F1 is where TuiCode tells you its keys, and half of it is wrong as soon as you make TuiCode yours. Anyone who rebinds a key in Settings › Keyboard Shortcuts, or gives a command a key it didn't have, hits it the next time they press F1.
- The Everywhere column is a fixed list of eight keys (
HelpView.Everywhere). RebindCtrl+Eand F1 still saysCtrl+E Command palette. Bind a key to Go to line and it never appears. And the dozens of global keys TuiCode does have (Ctrl+Gchords,Ctrl+P, the sidebar keys) aren't in it at all, so F1 under-sells the editor to a new user. - The place column is already right. I pressed F1 in the explorer on
origin/main: Explorer listedDelete, Ctrl+D,F2,Ctrl+X,Ctrl+Vfrom the live bindings, beside the fixed eight. - The status bar says
Press F1 for help, and the command is Getting Started (help), though what opens is a list of keys.
Evidence:
- The style guide's Finding keys rule (tui-style-guide#42, in
MentalDesk.Tui0.2.6, bumped by Bump MentalDesk.Tui from 0.2.9 to 0.2.12 #495): F1 opens Here and Everywhere, "both read from the keymap when it opens, so they can't drift from the real bindings"; Everywhere is grouped under the menu's headings; commands that can't run here, or have no key, are left out; the status bar's one hint isF1 keys. The library'sKeysDialog(built from aKeySheet) is the reference implementation. - AGENTS.md: "Where the library has a type, use it rather than a TuiCode copy; a change it needs goes to the style guide first."
- VS Code's Keyboard Shortcuts Reference is a static PDF and has the same drift; its live answer is the shortcuts editor. TuiCode can do better because F1 is in-app.
Options considered
- Read the eight from the bindings. Keep the list of eight commands but look up each one's key when F1 opens. Tiny, and fixes the stale key. But a newly bound command still never shows, and Everywhere stays an arbitrary eight.
- Rebuild
HelpView's Everywhere from every bound global command, grouped by menu. Fixes both, with no library dependency. But it's a TuiCode copy ofKeySheetandKeysDialog, which AGENTS.md rules out, and it drifts from Swatch and a-team. - Drop Everywhere and send people to Settings › Keyboard Shortcuts. That list is always right and searchable. But it's a settings screen, not a glance, and the guide says F1 shows both.
- Show the library's
KeysDialogon F1, from aKeySheetTuiCode builds from its own bindings and menu (chosen). One implementation of the rule, shared with Swatch. It needs the same library change In an "are you sure?" dialog, Enter can delete or discard if the wrong button has focus #483 does (tui-style-guide#44: run anAppDialogwithoutAppShell), so one library change unlocks both.
Proposal
- F1 opens the library's Keys dialog. Here: lists the focused place's keys, as today's right-hand column does (its fixed keys like
Enter Openfirst, then its commands' live bindings). Everywhere lists every global command that has a key and can run now, read from your bindings when F1 opens, grouped under the menu bar's headings (File, Edit, Selection, View, Go, Review, Help), then Other for bound commands with no menu item. - Rebind a key and F1 shows the new one; give a command a key and it appears under its menu's heading; unbind one and it's gone.
- Columns stack in a narrow terminal and scroll in a short one, as today.
Esccloses it. - The status bar says
F1 keys(or whatever key you've bound it to), and the command is renamed Show keys, in the Help menu and the palette.
Mockup
F1 in the explorer, 120×30. The real dialog scrolls; ↓ marks where.
┌┤Keys├──────────────────────────────────────────────────────────────────────────────┐
│ Everywhere │ Here: Explorer │
│ ───────────────────────────────────────── │ ───────────────────────────────────── │
│ File │ Enter Open │
│ Ctrl+N New file or folder │ → ← Expand or collapse │
│ Ctrl+O Open file or folder │ Delete, Ctrl+D Delete file or folder │
│ Ctrl+S Save │ F2 Move or rename │
│ Ctrl+W Close tab │ Ctrl+X Cut file or folder │
│ Ctrl+Q Quit │ Ctrl+V Paste file or folder │
│ Edit │ │
│ Ctrl+F Find in file │ │
│ View │ │
│ Ctrl+E Command palette │ │
│ Go │ │
│ Ctrl+G L Go to line │ │
│ Ctrl+G P Navigate back ↓ │ │
│ │
│ Esc close │
└─────────────────────────────────────────────────────────────────────────────────────┘
Explorer • Opened folder: ~/code/TuiCode F1 keys
Scope
In: F1 showing KeysDialog from TuiCode's live bindings and menu layout, everywhere F1 works today (explorer, editor, find bar, diff, Review, Usages, tabs); the status bar's F1 keys; the command renamed Show keys; AGENTS.md's description of F1 updated.
Out:
- The command palette and Show mnemonics, which already list commands with no key.
- Settings › Keyboard Shortcuts.
- Making F1 itself something other than the keys (the guide says it never means anything else).
- The other 0.2.x rules: loading (When I open a pull request or start a review, nothing on screen says it's loading, so it looks like nothing happened #498) and opposite actions (A "Toggle" menu item doesn't say which way it'll go, and I can't find "Hide sidebar" or "Mark viewed" by name #499) are their own Ideas.
Delivery
One TuiCode PR. It waits on tui-style-guide#44 being released (the same library change #483 waits on) and on MentalDesk.Tui 0.2.6 or later (Dependabot's #495 now bumps to 0.2.9; if it hasn't merged, the PR carries the bump).
Decided
All assumed by the Lead and accepted when the stakeholder approved the pitch.
- Use the library's
KeysDialog, not a TuiCode copy. AGENTS.md's rule, and it shares In an "are you sure?" dialog, Enter can delete or discard if the wrong button has focus #483's one library change. - TuiCode builds the
KeySheetitself from its own command and keybinding services andCommandMenu.Layout.KeySheetis a plain record, so this needs nothing more from the library; onlyKeySheet.Foris tied to the library's own registry. - A place's fixed keys stay in Here (
Enter Open,→ ← Expand or collapse): they're real keys a user needs, even though they aren't rebindable commands. - Only
Esccloses it. Enter and F1 do nothing in the library's dialog, where today Enter closes too. It's the library's behaviour, shared with Swatch. - The command becomes Show keys. What opens is the keys. If there's a Getting Started page you want kept under that name, say so.
- Editor-only commands appear under Here: Editor, not Everywhere, as today, since they only run in an editor.
Original idea
Opportunity
When I rebind a key in Settings, F1 still shows the old one. Its Everywhere column and each place's keys (Explorer, find bar, diff, Review…) are lists written into the code, not read from my bindings. So the one screen meant to tell me the keys is wrong as soon as I make TuiCode mine, and a command I've newly given a key never appears there. The status bar also says
F1 helpwhere the guide now saysF1 keys.Evidence
- MentalDesk.Tui 0.2.6, in Dependabot PR Bump MentalDesk.Tui from 0.2.9 to 0.2.12 #495 (tui-style-guide#42), adds the guide's Finding keys rule: F1 opens Here and Everywhere, "both read from the keymap when it opens, so they can't drift from the real bindings". Everywhere is grouped under the menu's headings, and commands that can't run here, or have no key, are left out. The library's
KeysDialogimplements it.- TuiCode's
HelpView.Everywhereis a fixed list of eight keys, and the per-place lists (e.g.ExplorerKeysinWorkbenchHost) are fixed too.StatusBarPartshowsTuiCode • F1 help.Why it fits
The vision's Discoverable says every action can be rebound in Settings. A keys reference that ignores rebinding undoes that. It's a daily-driver gap (theme 1) for anyone who has changed a binding.
Activity
a-team-app commentedon Oct 9, 2026
Recommended: High · theme 1, small · F1 is wrong for anyone who has rebound a key, and the library has KeysDialog to start from
a-team-app commentedon Oct 10, 2026
Now pitched. Its High priority put it ahead of #336, which went back to Exploring.
One change since drafting: Dependabot's #495 now bumps
MentalDesk.Tuito 0.2.9, so the Delivery line says so. The library change it waits on, tui-style-guide#44, is still open, the same one #483 waits on.a-team-app commentedon Oct 11, 2026
Broken down into one task: #512, F1 shows your live keys, grouped by menu.
It's held as
blockeduntil tui-style-guide#44 is released (the same library change #483 waits on); take the label off once it's out. Everything under Assumed was mine and is now under Decided.a-team-app commentedon Oct 23, 2026
Tried on
origin/main(74d30cd) with a clean home. F1 in the explorer and the editor opens Help: Everywhere on the left, grouped by menu heading, then Other, and the place's keys on the right. Rebinding the palette from Ctrl+E to Ctrl+K and giving Show log Ctrl+J both showed up in F1. Esc closes it and focus goes back to the editor. The status bar showsPress F1 for help. Done.