Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ Configuration is stored in the platform-specific config directory:
| `ai_search` | bool | `false` | Enable Copilot SDK-powered AI semantic search |
| `hiddenSessions` | array | `[]` | Session IDs hidden from the main list |
| `favoriteSessions` | array | `[]` | Session IDs starred as favorites |
| `keybindings` | object | `{}` | Remap keyboard shortcuts. Keys are action names, values are comma-separated key lists (see [Customizing Keybindings](#customizing-keybindings)) |

#### Pane Direction Semantics

Expand Down Expand Up @@ -349,7 +350,8 @@ When `launch_mode` is `"pane"`, the `pane_direction` value maps to Windows Termi
"notify_on_waiting": false,
"ai_search": false,
"hiddenSessions": [],
"favoriteSessions": []
"favoriteSessions": [],
"keybindings": {}
}
```

Expand All @@ -361,6 +363,40 @@ Set `custom_command` to replace the default Copilot CLI launch entirely. Use `{s
"custom_command": "my-tool resume {sessionId}"
```

### Customizing Keybindings

Set `keybindings` in `config.json` to remap keyboard shortcuts. Each key is an
action name and each value is a comma-separated list of keys that trigger it.
Listed actions replace their default keys; any action you do not list keeps its
default. Unknown action names are ignored, and if a remap collides with a key
another action already uses, that remap is dropped and the default is kept.

```json
"keybindings": {
"search": "/,ctrl+f",
"cmd_palette": "ctrl+k",
"quit": "q"
}
```

Key names follow Bubble Tea conventions: single characters (`a`, `/`, `?`),
named keys (`up`, `down`, `left`, `right`, `enter`, `esc`, `tab`, `space`,
`pgup`, `pgdown`), and modifier combinations (`ctrl+f`, `alt+left`, `shift+tab`).

Available action names:

`up`, `down`, `left`, `right`, `enter`, `space`, `quit`, `force_quit`,
`search`, `escape`, `filter`, `sort`, `sort_order`, `pivot`, `pivot_order`,
`preview`, `reindex`, `help`, `config`, `time_range_1`, `time_range_2`,
`time_range_3`, `time_range_4`, `hide`, `toggle_hidden`, `star`,
`launch_window`, `launch_tab`, `launch_pane`, `preview_scroll_up`,
`preview_scroll_down`, `jump_next_attention`, `filter_attention`, `launch_all`,
`select_all`, `deselect_all`, `conversation_sort`, `preview_position`,
`resume_interrupted`, `view_plan`, `copy_id`, `copy_path`,
`copy_resume_command`, `copy_preview`, `expand_collapse_all`,
`scan_work_status`, `export`, `note`, `shift_up`, `shift_down`, `view_switch`,
`open_file`, `open_dir`, `timeline`, `compare`, `cmd_palette`.

## Themes

Five built-in color schemes:
Expand Down
6 changes: 6 additions & 0 deletions docs/keybindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
# Dispatch TUI (Bubble Tea v2 Go Application)
# Directory: internal\tui

> **Customizing keybindings:** The keys below are the defaults. You can remap any
> of them with the `keybindings` object in `config.json`. Each entry maps an
> action name to a comma-separated key list, for example `"search": "/,ctrl+f"`.
> See the "Customizing Keybindings" section of the README for the full list of
> action names and the rules for conflict handling.

## KEYBOARD SHORTCUTS - GLOBAL (Always Available)

### Force Quit (Works in All States)
Expand Down
7 changes: 7 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,13 @@ type Config struct {
// every scan and not for sessions already waiting when dispatch starts.
NotifyOnWaiting bool `json:"notify_on_waiting,omitempty"`

// Keybindings remaps keyboard shortcuts. Keys are action names (see the
// README for the full list, e.g. "search", "quit", "preview") and values
// are comma-separated key lists (e.g. "/,ctrl+f"). Listed actions replace
// their default keys; unlisted actions keep their defaults. Unknown action
// names and keys that collide with another action are ignored.
Keybindings map[string]string `json:"keybindings,omitempty"`

// Theme is the active color scheme name. "auto" (or empty) means
// detect from the terminal; any other value is looked up in Schemes
// and then the built-in scheme list.
Expand Down
Loading