You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add configurable TUI key bindings via config file (#6)
## Summary
- Add `[keys]` section to TOML config for overriding TUI key bindings
- Action names are context-prefixed (`cursor_`, `grid_`, `detail_`,
`search_`, `global_`) for clarity
- Single string or array of strings supported; only overridden keys
change, others keep defaults
- Help text auto-updates to reflect configured bindings
## Implementation
- `KeysConfig` type with custom `UnmarshalTOML` normalizing single
strings to `[]string`
- `ApplyKeysConfig()` maps config action names to `KeyMap` fields via
registry
- `NewModel` accepts optional `KeysConfig` parameter
- Config merge overlays per-action (child overrides parent)
## Test plan
- [x] Config parsing tests: single string, array, mixed, no `[keys]`
section, merge overlay/nil
- [x] `ApplyKeysConfig` tests: single/multiple actions, unknown ignored,
nil config, help text updated, all 16 actions recognized
- [x] All existing tests updated and passing
- [x] `mise run lint` — 0 issues
Closes#3
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments