mirror of
https://github.com/charmbracelet/gum
synced 2024-06-07 00:02:35 +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.aborted = true
|
||||||
m.quitting = true
|
m.quitting = true
|
||||||
return m, tea.Quit
|
return m, tea.Quit
|
||||||
case " ", "tab", "x":
|
case " ", "tab", "x", "ctrl+@":
|
||||||
if m.limit == 1 {
|
if m.limit == 1 {
|
||||||
break // no op
|
break // no op
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,6 +163,11 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||||
}
|
}
|
||||||
m.ToggleSelection()
|
m.ToggleSelection()
|
||||||
m.CursorUp()
|
m.CursorUp()
|
||||||
|
case "ctrl+@":
|
||||||
|
if m.limit == 1 {
|
||||||
|
break // no op
|
||||||
|
}
|
||||||
|
m.ToggleSelection()
|
||||||
default:
|
default:
|
||||||
m.textinput, cmd = m.textinput.Update(msg)
|
m.textinput, cmd = m.textinput.Update(msg)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue