Skip to content

feat(tui): make dialog keybinds configurable (#6143) - #6144

Merged
rekram1-node merged 1 commit into
anomalyco:devfrom
CasualDeveloper:feat/configurable-dialog-keybinds
Jan 15, 2026
Merged

feat(tui): make dialog keybinds configurable (#6143)#6144
rekram1-node merged 1 commit into
anomalyco:devfrom
CasualDeveloper:feat/configurable-dialog-keybinds

Conversation

@CasualDeveloper

@CasualDeveloperCasualDeveloper commented Dec 25, 2025

Copy link
Copy Markdown
Contributor

Summary

  • Add configurable keybinds for dialog actions (delete, rename, favorite, etc.)
  • Change session_rename default from none to ctrl+r

Closes#6143

New Keybind Options

OptionDefaultDescription
session_deletectrl+dDelete session
session_renamectrl+rRename session
stash_deletectrl+dDelete stash entry
model_provider_listctrl+aOpen provider list
model_favorite_togglectrl+fToggle model favorite

Usage

{
"keybinds": {
"session_delete": "super+d",
"session_rename": "super+r"
}
}

Note: If another PR touching packages/sdk/openapi.json merges first, rebase and rerun bun ./script/generate.ts, then update packages/sdk/js/src/v2/gen/types.gen.ts.

CopilotAI review requested due to automatic review settings December 25, 2025 03:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds configurable keybinds for dialog actions in the TUI, allowing users to customize keyboard shortcuts for operations like deleting sessions/stash entries, renaming sessions, toggling model favorites, and opening the provider list. The default for session_rename has also been changed from none to ctrl+r.

Key Changes:

  • Added five new configurable keybind options: session_delete, session_rename (default changed), stash_delete, model_provider_list, and model_favorite_toggle
  • Updated dialog components to use the configurable keybind system instead of hardcoded values
  • Enhanced Keybind.match() and Keybind.toString() utility functions to handle undefined values

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
packages/sdk/openapi.jsonAdds OpenAPI schema definitions for the five new keybind configuration options with their default values
packages/sdk/js/src/v2/gen/types.gen.tsGenerates TypeScript type definitions for the new keybind options in the SDK
packages/sdk/js/package.jsonFormatting fix (adds trailing newline)
packages/plugin/package.jsonFormatting fix (adds trailing newline)
packages/opencode/src/util/keybind.tsUpdates match() and toString() to accept Info | undefined for safer handling of missing keybinds
packages/opencode/src/config/config.tsAdds Zod schema definitions for the new keybind options with default values
packages/opencode/src/cli/cmd/tui/component/dialog-stash.tsxReplaces hardcoded ctrl+d with configurable stash_delete keybind
packages/opencode/src/cli/cmd/tui/component/dialog-session-list.tsxReplaces hardcoded ctrl+d and ctrl+r with configurable session_delete and session_rename keybinds
packages/opencode/src/cli/cmd/tui/component/dialog-model.tsxReplaces hardcoded ctrl+a and ctrl+f with configurable model_provider_list and model_favorite_toggle keybinds

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/opencode/src/cli/cmd/tui/component/dialog-stash.tsx Outdated
Comment threadpackages/opencode/src/cli/cmd/tui/component/dialog-session-list.tsx Outdated
Comment threadpackages/opencode/src/cli/cmd/tui/component/dialog-session-list.tsx Outdated
Comment threadpackages/opencode/src/cli/cmd/tui/component/dialog-model.tsx Outdated
Comment threadpackages/opencode/src/cli/cmd/tui/component/dialog-model.tsx Outdated
@CasualDeveloper
CasualDeveloperforce-pushed the feat/configurable-dialog-keybinds branch from c1300af to 8cdfc63CompareDecember 25, 2025 04:01
@CasualDeveloper

Copy link
Copy Markdown
ContributorAuthor

Updated to address Copilot review feedback:

  • Changed ![0] to ?.[0] for safer keybind access
  • Updated DialogSelect type to accept optional keybind (allows disabling via "none")
  • Added filtering for undefined keybinds in the component

This PR also closes #3262.

@rekram1-node

Copy link
Copy Markdown
Collaborator

Yep these should all be configurable, good catch

@rekram1-node

Copy link
Copy Markdown
Collaborator

/review

@github-actions

Copy link
Copy Markdown
Contributor

lgtm

@CasualDeveloper
CasualDeveloperforce-pushed the feat/configurable-dialog-keybinds branch from 7e9d871 to 8cdfc63CompareDecember 25, 2025 15:21
@rekram1-node

Copy link
Copy Markdown
Collaborator

this should be good to merge, ill do so after xmas

@CasualDeveloperCasualDeveloper changed the title feat(tui): make dialog keybinds configurable[#6143] feat(tui): make dialog keybinds configurableDec 26, 2025
@CasualDeveloperCasualDeveloper changed the title [#6143] feat(tui): make dialog keybinds configurable[6143] feat(tui): make dialog keybinds configurableDec 26, 2025
@CasualDeveloperCasualDeveloper changed the title [6143] feat(tui): make dialog keybinds configurablefeat(tui): make dialog keybinds configurable (#6143)Dec 26, 2025
@CasualDeveloper
CasualDeveloperforce-pushed the feat/configurable-dialog-keybinds branch 2 times, most recently from 0e6bafd to 00f3532CompareDecember 30, 2025 19:06
@CasualDeveloper

Copy link
Copy Markdown
ContributorAuthor

Noted, thanks. Will continue rebasing on top of release tags as they're set to make it easier for ya.

@CasualDeveloper

Copy link
Copy Markdown
ContributorAuthor

/review

@CasualDeveloper
CasualDeveloperforce-pushed the feat/configurable-dialog-keybinds branch 2 times, most recently from 693242f to 4cbbac5CompareJanuary 1, 2026 16:33
@agentic-ai-forge

Copy link
Copy Markdown

+1 Would like to see this implemented. Find my self missing the ctrl + s from claude code to stash as I used this frequently.

@CasualDeveloper
CasualDeveloperforce-pushed the feat/configurable-dialog-keybinds branch 3 times, most recently from 1c85b18 to a03102eCompareJanuary 6, 2026 13:11
@CasualDeveloper

Copy link
Copy Markdown
ContributorAuthor

this should be good to merge, ill do so after xmas

hey Aiden, this still on track to merge soon? ;)

@CasualDeveloper
CasualDeveloperforce-pushed the feat/configurable-dialog-keybinds branch 6 times, most recently from eefe468 to 4e2bc8eCompareJanuary 11, 2026 14:43
@CasualDeveloper
CasualDeveloperforce-pushed the feat/configurable-dialog-keybinds branch 5 times, most recently from da7b6cd to d78efadCompareJanuary 14, 2026 16:10
Add session_delete, stash_delete, model_provider_list, and
model_favorite_toggle to keybind config. Also change session_rename
default from 'none' to 'ctrl+r'.
Closesanomalyco#6143
@CasualDeveloper
CasualDeveloperforce-pushed the feat/configurable-dialog-keybinds branch from d78efad to 4ac0372CompareJanuary 14, 2026 20:39
@rekram1-node

Copy link
Copy Markdown
Collaborator

yeah lemme test when i get home

you have a few prs but im struggling to keep up, consider joining our discord or dming me somewhere to get my attention on these!

@CasualDeveloper

Copy link
Copy Markdown
ContributorAuthor

consider joining our discord or dming me somewhere to get my attention on these!

done and done :D

@rekram1-node
rekram1-node merged commit 76a7928 into anomalyco:devJan 15, 2026
3 checks passed
@CasualDeveloper
CasualDeveloper deleted the feat/configurable-dialog-keybinds branch January 15, 2026 06:27
github-actionsBot pushed a commit to yuguorui/opencode that referenced this pull request Jan 18, 2026
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 2026
Sign up for freeto 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.

[Enhancement] Add configurable keybinds for dialog actions (#6144)

4 participants

@CasualDeveloper@rekram1-node@agentic-ai-forge