mirror of
https://github.com/charmbracelet/gum
synced 2024-05-17 13:46:42 +02:00
feat: add ctrl+@
(ctrl+space
) keybinding for choose
and filter
(#276)
* feat(filter): add ctrl+@ keybinding * feat(choose): add ctrl+@ keybinding
This commit is contained in:
parent
488138e4b5
commit
877c475aa6
|
@ -116,7 +116,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||
m.aborted = true
|
||||
m.quitting = true
|
||||
return m, tea.Quit
|
||||
case " ", "tab", "x":
|
||||
case " ", "tab", "x", "ctrl+@":
|
||||
if m.limit == 1 {
|
||||
break // no op
|
||||
}
|
||||
|
|
|
@ -163,6 +163,11 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||
}
|
||||
m.ToggleSelection()
|
||||
m.CursorUp()
|
||||
case "ctrl+@":
|
||||
if m.limit == 1 {
|
||||
break // no op
|
||||
}
|
||||
m.ToggleSelection()
|
||||
default:
|
||||
m.textinput, cmd = m.textinput.Update(msg)
|
||||
|
||||
|
|
Loading…
Reference in a new issue