[PR #45] [CLOSED] Adding keymaps to config file #9516

Closed
opened 2026-02-16 18:13:41 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/45
Author: @jpoz
Created: 5/20/2025
Status: Closed

Base: devHead: keymaps


📝 Commits (5)

  • 77c3b37 Adding keymaps to config file
  • 9805e46 moving to a flat configuration
  • 512ef06 removing unused keymaps
  • 4ba1c36 moderizing with max func
  • 1d1a588 Merge branch 'dev' into keymaps

📊 Changes

10 files changed (+321 additions, -143 deletions)

View changed files

📝 internal/config/config.go (+11 -1)
internal/config/keymaps.go (+206 -0)
📝 internal/diff/diff_test.go (+3 -3)
📝 internal/tui/components/chat/editor.go (+12 -12)
📝 internal/tui/components/chat/messages.go (+14 -1)
📝 internal/tui/components/dialog/custom_commands_test.go (+10 -10)
📝 internal/tui/components/dialog/filepicker.go (+1 -1)
📝 internal/tui/components/dialog/help.go (+14 -1)
📝 internal/tui/page/chat.go (+16 -31)
📝 internal/tui/tui.go (+34 -83)

📄 Description

This PR allows users to override default keymaps:

{
  "data": {},
  "tui": {
    "theme": "opencode"
  },
  "shell": {},
  "keyMaps": {
    "chat": {
      "toggleTools": [
        "ctrl+b"
      ]
    }
  }
}

It also updates the help dialog:

image

And the bar above the message input:

image

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/45 **Author:** [@jpoz](https://github.com/jpoz) **Created:** 5/20/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `keymaps` --- ### 📝 Commits (5) - [`77c3b37`](https://github.com/anomalyco/opencode/commit/77c3b3706f7164e404306b5f086e9d2454e91387) Adding keymaps to config file - [`9805e46`](https://github.com/anomalyco/opencode/commit/9805e46b01d45b202ee7b621f28d842bd76e570b) moving to a flat configuration - [`512ef06`](https://github.com/anomalyco/opencode/commit/512ef060f1baa7876a18597c187b543fa48f3015) removing unused keymaps - [`4ba1c36`](https://github.com/anomalyco/opencode/commit/4ba1c36f9d04fac2d67d66d23883ab8ae932ff46) moderizing with max func - [`1d1a588`](https://github.com/anomalyco/opencode/commit/1d1a58847a7892ccb622916eda2172b029581a42) Merge branch 'dev' into keymaps ### 📊 Changes **10 files changed** (+321 additions, -143 deletions) <details> <summary>View changed files</summary> 📝 `internal/config/config.go` (+11 -1) ➕ `internal/config/keymaps.go` (+206 -0) 📝 `internal/diff/diff_test.go` (+3 -3) 📝 `internal/tui/components/chat/editor.go` (+12 -12) 📝 `internal/tui/components/chat/messages.go` (+14 -1) 📝 `internal/tui/components/dialog/custom_commands_test.go` (+10 -10) 📝 `internal/tui/components/dialog/filepicker.go` (+1 -1) 📝 `internal/tui/components/dialog/help.go` (+14 -1) 📝 `internal/tui/page/chat.go` (+16 -31) 📝 `internal/tui/tui.go` (+34 -83) </details> ### 📄 Description This PR allows users to override default keymaps: ``` { "data": {}, "tui": { "theme": "opencode" }, "shell": {}, "keyMaps": { "chat": { "toggleTools": [ "ctrl+b" ] } } } ``` It also updates the help dialog: <img width="824" alt="image" src="https://github.com/user-attachments/assets/50e77229-0005-4323-b951-13f156c696e3" /> And the bar above the message input: <img width="828" alt="image" src="https://github.com/user-attachments/assets/2ef0214e-3dd7-4fc4-992b-1e8b595bad80" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:13:41 -05:00
yindo closed this issue 2026-02-16 18:13:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9516