diff --git a/internal/tui/keymap.go b/internal/tui/keymap.go index 7c7b5ff..5632f48 100644 --- a/internal/tui/keymap.go +++ b/internal/tui/keymap.go @@ -28,7 +28,7 @@ type KeyMap struct { // DefaultKeyMap returns a set of default keybindings. var Keys = KeyMap{ Quit: key.NewBinding( - key.WithKeys("ctrl+q"), + key.WithKeys("q", "ctrl+q"), ), Down: key.NewBinding( key.WithKeys("down"), diff --git a/internal/tui/update.go b/internal/tui/update.go index 9e8f20f..26f0271 100644 --- a/internal/tui/update.go +++ b/internal/tui/update.go @@ -64,7 +64,9 @@ func (b *Bubble) handleKeys(msg tea.KeyMsg) tea.Cmd { switch { case key.Matches(msg, b.keyMap.Quit): - return tea.Quit + if !b.showCommandInput { + return tea.Quit + } case key.Matches(msg, b.keyMap.Down): if b.activeBox == constants.PrimaryBoxActive && !b.showCommandInput && !b.showBoxSpinner {