diff options
author | Maas Lalani <maas@lalani.dev> | 2022-12-13 14:40:35 -0500 |
---|---|---|
committer | Maas Lalani <maas@lalani.dev> | 2022-12-13 14:41:29 -0500 |
commit | 2d54d5394e77172bc4e5da4c9b445136d95ea551 (patch) | |
tree | 77ba9edaab80cf4ba28e49963805de07946e4500 | |
parent | e108bc46687a92c670166a9689913eb01f01f06d (diff) |
feat(choose): add ctrl+j / ctrl+k keybindings
-rw-r--r-- | choose/choose.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/choose/choose.go b/choose/choose.go index c7432d8..9aa6f93 100644 --- a/choose/choose.go +++ b/choose/choose.go @@ -54,7 +54,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { case tea.KeyMsg: start, end := m.paginator.GetSliceBounds(len(m.items)) switch keypress := msg.String(); keypress { - case "down", "j", "ctrl+n": + case "down", "j", "ctrl+j", "ctrl+n": m.index++ if m.index >= len(m.items) { m.index = 0 @@ -63,7 +63,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { if m.index >= end { m.paginator.NextPage() } - case "up", "k", "ctrl+p": + case "up", "k", "ctrl+k", "ctrl+p": m.index-- if m.index < 0 { m.index = len(m.items) - 1 |