Repository navigation
Closed
Labels
tuimecatui terminal UI (rendering, keybindings, footer, panes, scrollback)
Description
Problem
mecatui has a complete operator keybinding-override mechanism, but it is documented nowhere — not in docs/tui.md (the page that bills itself as "the full mecatui reference: every keybinding") and not in user-docs/.
The feature that exists in code (and is tested):
cmd/mecatui/keymap/validator.go—Parse+Validateover an action→chords map, with scope-collision detection and bare-printable-rune rules.cmd/mecatui/keymap_wiring_yaml.go— reads akeymap:map from operator-tier~/.config/mecatl/settings.yaml(action name → comma-separated chords), overlays the repeatable--keymap Action=chord[,chord2]CLI flag (CLI wins per-action), validates, feedsui.Deps.KeyOverrides.cmd/mecatui/ui/keys.go—keyMapstruct +applyKeyOverrides, guarded bykeys_test.gowhich fails if anykeyMapfield lacks an override setter.
A concrete, currently-undocumented use case: reclaim ctrl+a / ctrl+e for the input box's line-start / line-end editing. The bubbles textarea already binds LineStart: home/ctrl+a and LineEnd: end/ctrl+e internally, but mecatui's onIdleKey switch intercepts ctrl+a (Agents overlay) and ctrl+e (Effort picker) before the keystroke reaches the textarea. Remapping Agents/Effort off those chords frees them — but an operator can't discover that without reading the source.
What "done" looks like
user-docs/— extendwhat-you-get/mecatui.mdwith a "Remapping keys" section: thekeymap:override schema with a worked example (remappingAgents/Effortsoctrl+a/ctrl+ereach the input), both surfaces (YAML + the--keymapCLI flag, CLI wins per-action), the collision/validation rules in plain language, and the action-map vs textarea-internal-bindings distinction. Note settings are read once at startup — restart to apply (live reload is mecatui: live-reload operator settings (keymap) without restart #456).docs/tui.md— add the keybinding-override reference section: the full default-action table (every action, default chord(s), scope, what it does), the textarea-internal editing bindings (read from the bubbles textarea KeyMap), the override schema (both surfaces) and the validation rules. Make the page's "every keybinding" claim true.- Help-overlay liveness fix (code) — the
?keys-&-features overlay (cmd/mecatui/ui/help.go) renders only some chords live from thekeyMap(agentsKey,jumpKey); the rest are hardcoded literals (ctrl+e,ctrl+o/r/p,ctrl+t,alt+m,ctrl+v, and the rebindableenter/shift+enter). After a remap the overlay would still show the old chord. Introduce ahelpKeysmarkings struct built once on the Model (m.helpKeyMarkings()), pass it intohelpBody/renderHelpOverlay, and replace the literals so the overlay never lies after a remap. Non-rebindable rows (esc,/,?,ctrl+c, etc.) stay literals. - Follow
website/CLAUDE.md: content-root-relative.mdlinks, keepsidebar_position,task site:buildas the broken-link gate,task docsto regeneratellms.txtbefore committing.
Explicitly out of scope
docs/configuration-reference.md— deliberately NOT updated. The generated reference is explicitly the server (mecated/permconfig) schema, andkeymap:is a client-side key the server ignores; a future client/server settings split (config: split mecatui client settings out of the server settings.yaml into its own file #459) will give mecatui its own reference. Documentingkeymap:indocs/tui.md+ user-docs is sufficient for now.- Footer/inline-card affordance liveness (separate, larger surface) — mecatui: footer / inline-card affordance strings don't reflect keymap overrides #457.
- Live-reload of settings — mecatui: live-reload operator settings (keymap) without restart #456.
- Exposing textarea-internal actions through the override validator — a separate, larger feature.
- Changing any default binding — opt-in operator config.
Notes
- No code change is required to make remapping work; the only code in scope is item 3 (help-overlay liveness), which the docs depend on being true.
- Related: mecatui: live-reload operator settings (keymap) without restart #456 (live reload), mecatui: footer / inline-card affordance strings don't reflect keymap overrides #457 (footer liveness), config: split mecatui client settings out of the server settings.yaml into its own file #459 (client/server settings split).
Metadata
Metadata
Assignees
Labels
tuimecatui terminal UI (rendering, keybindings, footer, panes, scrollback)
Activity
docs+fix(mecatui): document keymap overrides, live help-overlay bindi…
feat(mecatui): split client keymap settings into ~/.config/mecatui/se…