tui: settings — interactive keybindings editor #146

Closed
opened 2026-04-14 20:14:28 +00:00 by claude-desktop · 0 comments
Collaborator

User story

As a user with a custom keymap, I want to view and rebind every action interactively from the Settings screen, so that I don't have to hand-edit tui.toml.

Background

The Settings KeyBindings section is currently display-only (a hint says "edit tui.toml directly"). crates/loom-tui/src/keybinds.rs already loads from TOML; we need a UI on top.

Acceptance criteria

List view

  • Settings → KeyBindings section shows all action IDs and their current bindings (loaded from KeyMap)
  • Grouped by category: navigation, generation, gallery, palette, etc.
  • Each row: [g g] nav.gallery Open the gallery screen

Rebind

  • Enter on a row opens a small overlay: "Press a key combo (Esc to cancel)"
  • Captures the next key event (including chord prefixes) and writes it back
  • Conflict detection: if the new combo is already bound, surface a warning with the conflicting action and require confirmation

Reset

  • r on a row resets that single binding to the navigation-preset default
  • R (uppercase) resets the entire map to defaults (with Confirm)

Persistence

  • Changes save to ~/.config/loom/tui.toml immediately on each rebind
  • Publishes LoomEvent::SettingsChanged so other components can pick up new hints

Tests

  • Unit: rebinding writes a parseable TOML chunk
  • Unit: conflict detection finds collisions across all action IDs

Out of scope

  • Per-screen overlays (everything is global for v1)
  • Mouse binding configuration
  • Multi-stroke chord recording UI (but parsing/storage already supports them)

References

  • crates/loom-tui/src/keybinds.rs (KeyMap, Binding)
  • crates/loom-tui/src/screens/settings.rs (KeyBindings section placeholder)
  • crates/loom-tui/src/config.rs (tui.toml schema)
## User story As a user with a custom keymap, I want to view and rebind every action interactively from the Settings screen, so that I don't have to hand-edit `tui.toml`. ## Background The Settings KeyBindings section is currently display-only (a hint says "edit `tui.toml` directly"). `crates/loom-tui/src/keybinds.rs` already loads from TOML; we need a UI on top. ## Acceptance criteria ### List view - [ ] Settings → KeyBindings section shows all action IDs and their current bindings (loaded from `KeyMap`) - [ ] Grouped by category: navigation, generation, gallery, palette, etc. - [ ] Each row: `[g g] nav.gallery Open the gallery screen` ### Rebind - [ ] `Enter` on a row opens a small overlay: "Press a key combo (Esc to cancel)" - [ ] Captures the next key event (including chord prefixes) and writes it back - [ ] Conflict detection: if the new combo is already bound, surface a warning with the conflicting action and require confirmation ### Reset - [ ] `r` on a row resets that single binding to the navigation-preset default - [ ] `R` (uppercase) resets the entire map to defaults (with Confirm) ### Persistence - [ ] Changes save to `~/.config/loom/tui.toml` immediately on each rebind - [ ] Publishes `LoomEvent::SettingsChanged` so other components can pick up new hints ### Tests - [ ] Unit: rebinding writes a parseable TOML chunk - [ ] Unit: conflict detection finds collisions across all action IDs ## Out of scope - Per-screen overlays (everything is global for v1) - Mouse binding configuration - Multi-stroke chord recording UI (but parsing/storage already supports them) ## References - `crates/loom-tui/src/keybinds.rs` (`KeyMap`, `Binding`) - `crates/loom-tui/src/screens/settings.rs` (KeyBindings section placeholder) - `crates/loom-tui/src/config.rs` (`tui.toml` schema)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/loom#146
No description provided.