[PR #3888] feat: add keybindings reference dialog to TUI #10792

Open
opened 2026-02-16 18:15:32 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/3888

State: open
Merged: No


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.

Solution

Added a searchable keybindings dialog accessible via <leader>? that displays all 88 keybindings with their descriptions.

What Changed

  • Created dialog-keybindings.tsx using the existing DialogSelect component
  • Added keybindings_list config option (default: <leader>? = ctrl+x + ?)
  • Registered in command palette under "System" category
  • Descriptions dynamically extracted from config schema using zodToJsonSchema

How to Use

Via Keybinding: Press ctrl+x then ?
Via Command Palette: Press ctrl+p, type "keybindings"

Implementation

Follows existing patterns:

  • Reuses DialogSelect component (same as model/theme lists)
  • Fetches keybindings from useKeybind() hook
  • Alphabetically sorted and searchable by default
  • Descriptions stay in sync with schema automatically (single source of truth)

Fixes #3886

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/3888 **State:** open **Merged:** No --- ## 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. ## Solution Added a searchable keybindings dialog accessible via `<leader>?` that displays all 88 keybindings with their descriptions. ## What Changed - Created `dialog-keybindings.tsx` using the existing `DialogSelect` component - Added `keybindings_list` config option (default: `<leader>?` = ctrl+x + ?) - Registered in command palette under "System" category - Descriptions dynamically extracted from config schema using `zodToJsonSchema` ## How to Use **Via Keybinding:** Press `ctrl+x` then `?` **Via Command Palette:** Press `ctrl+p`, type "keybindings" ## Implementation Follows existing patterns: - Reuses `DialogSelect` component (same as model/theme lists) - Fetches keybindings from `useKeybind()` hook - Alphabetically sorted and searchable by default - Descriptions stay in sync with schema automatically (single source of truth) Fixes #3886
yindo added the pull-request label 2026-02-16 18:15:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10792