Skip to content

Conversation

@frankdierolf
Copy link
Contributor

Problem

When using the TUI, there's no easy way to discover what keybindings are available. Users have to check documentation or dig through config files to find out what shortcuts they can use. This makes it harder to learn and use the TUI efficiently.

Solution

I added a simple keybindings reference dialog that displays all available keybindings in one place. The approach was straightforward - the goal was to display keybindings, so I made them displayable. No overthinking, just a practical solution.

What Changed

New Component:

  • Created dialog-keybindings.tsx that lists all keybindings with descriptions
  • Uses the existing DialogSelect component for consistency with other TUI dialogs (models, themes, sessions)
  • Automatically fetches all keybindings from the keybind context
  • Shows them in a searchable/filterable alphabetical list

Configuration:

  • Added keybindings_list config option with default keybinding <leader>? (ctrl+x + ?)
  • Registered in the command palette as "Show keybindings"

Integration:

  • Added import and registration in app.tsx
  • Follows the same pattern as existing dialogs (model list, theme list, etc.)

How to Use

Via Keybinding:

  • Press ctrl+x (leader key), then ?

Via Command Palette:

  • Press ctrl+p
  • Type "keybindings" or "Show keybindings"
  • Hit enter

Implementation Notes

I followed the existing patterns in the codebase:

  • Reused DialogSelect component (same as model/theme lists)
  • Used useKeybind() hook to fetch all keybindings dynamically
  • Kept descriptions in sync with config schema
  • Made it searchable by default (built into DialogSelect)

Simplicity first - just showing what's there, no extra features.

Fixes #3886

Adds a dialog to view all available keybindings with descriptions.
Accessible via <leader>? or command palette.

Fixes sst#3886
@frankdierolf
Copy link
Contributor Author

Hola,

Please take some seconds to review.
Thats a feautre which tangles the UX space as, thats why^^

  • I throwed in under "System" which seemed reasonable to me:
  • And I made the decision for <leader> + ?
  • And I ordered the overview alphabetically.
  • Only READ
  • Didn't test how it will behave with custom keybindings. Should be fine, but don't know.
image image

Best regrads,

Frank ✌️

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.

Missing keybindings reference in TUI

1 participant