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:
MuXiu1997 2023-02-28 07:59:40 +08:00 committed by GitHub
parent 488138e4b5
commit 877c475aa6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -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
}

View file

@ -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)