diff options
| author | Frank <[email protected]> | 2025-07-22 16:15:41 -0400 |
|---|---|---|
| committer | Frank <[email protected]> | 2025-07-22 16:46:44 -0400 |
| commit | 80b17dab44bd383d15e96764584334915d5bf54e (patch) | |
| tree | dcf358612a60f225848e28bda99369d60f20e838 /packages | |
| parent | 6d2ffa82de016fd1f9e7d7a8bd0a45285cdd5d00 (diff) | |
| download | opencode-80b17dab44bd383d15e96764584334915d5bf54e.tar.gz opencode-80b17dab44bd383d15e96764584334915d5bf54e.zip | |
wip: vscode extension
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/tui/internal/components/commands/commands.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/tui/internal/components/commands/commands.go b/packages/tui/internal/components/commands/commands.go index 71e608888..b8e7871ce 100644 --- a/packages/tui/internal/components/commands/commands.go +++ b/packages/tui/internal/components/commands/commands.go @@ -2,6 +2,7 @@ package commands import ( "fmt" + "runtime" "strings" tea "github.com/charmbracelet/bubbletea/v2" @@ -76,6 +77,10 @@ func (c *commandsComponent) View() string { } if c.showVscode { + ctrlKey := "ctrl" + if runtime.GOOS == "darwin" { + ctrlKey = "cmd" + } commandsToShow = append(commandsToShow, // empty line commands.Command{ @@ -86,14 +91,14 @@ func (c *commandsComponent) View() string { Name: commands.CommandName(util.Ide()), Description: "open opencode", Keybindings: []commands.Keybinding{ - {Key: "cmd+esc", RequiresLeader: false}, + {Key: ctrlKey + "+esc", RequiresLeader: false}, }, }, commands.Command{ Name: commands.CommandName(util.Ide()), Description: "reference file", Keybindings: []commands.Keybinding{ - {Key: "cmd+opt+k", RequiresLeader: false}, + {Key: ctrlKey + "+opt+k", RequiresLeader: false}, }, }, ) |
