diff --git a/internal/tui/components/dialogs/commands/commands.go b/internal/tui/components/dialogs/commands/commands.go index e0f9ac004daddc7b4071f43050862f6ce34d924d..872b18065463408adf4f23e77282bbed02f0ce7f 100644 --- a/internal/tui/components/dialogs/commands/commands.go +++ b/internal/tui/components/dialogs/commands/commands.go @@ -281,7 +281,7 @@ func (c *commandDialogCmp) defaultCommands() []Command { ID: "switch_model", Title: "Switch Model", Description: "Switch to a different model", - Shortcut: "alt+m", + Shortcut: "ctrl+l", Handler: func(cmd Command) tea.Cmd { return util.CmdHandler(SwitchModelMsg{}) }, diff --git a/internal/tui/keys.go b/internal/tui/keys.go index bda3b04bce651bda2f5e6b25d0302354696d0be4..0b6e0da4450d62e58b95be0678609b66491ab6b4 100644 --- a/internal/tui/keys.go +++ b/internal/tui/keys.go @@ -34,8 +34,8 @@ func DefaultKeyMap() KeyMap { key.WithHelp("ctrl+z", "suspend"), ), Models: key.NewBinding( - key.WithKeys("alt+m"), - key.WithHelp("alt+m", "models"), + key.WithKeys("ctrl+l"), + key.WithHelp("ctrl+l", "models"), ), Sessions: key.NewBinding( key.WithKeys("ctrl+s"), diff --git a/internal/tui/page/chat/chat.go b/internal/tui/page/chat/chat.go index c261924b4e34bc1ba76728cd3810c42ede1cf238..9aaadcedc1bbab30241ea2883f03cc3631a6e00f 100644 --- a/internal/tui/page/chat/chat.go +++ b/internal/tui/page/chat/chat.go @@ -928,9 +928,15 @@ func (p *chatPage) Help() help.KeyMap { key.WithHelp("ctrl+p", "commands"), ) modelsBinding := key.NewBinding( - key.WithKeys("alt+m"), - key.WithHelp("alt+m", "models"), + key.WithKeys("ctrl+l"), + key.WithHelp("ctrl+l", "models"), ) + if p.keyboardEnhancements.SupportsKeyDisambiguation() { + modelsBinding = key.NewBinding( + key.WithKeys("ctrl+m"), + key.WithHelp("ctrl+m", "models"), + ) + } helpBinding := key.NewBinding( key.WithKeys("ctrl+g"), key.WithHelp("ctrl+g", "more"), diff --git a/internal/tui/tui.go b/internal/tui/tui.go index 5dc12a8e88c20c05bdba3b74157416d34bb6d236..addd7cc8256607a408051fe33f29b299e5dafb30 100644 --- a/internal/tui/tui.go +++ b/internal/tui/tui.go @@ -104,6 +104,12 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.KeyboardEnhancementsMsg: + if msg.SupportsKeyDisambiguation() { + a.keyMap.Models = key.NewBinding( + key.WithKeys("ctrl+m"), + key.WithHelp("ctrl+m", "models"), + ) + } for id, page := range a.pages { m, pageCmd := page.Update(msg) if model, ok := m.(util.Model); ok {