Commit 0a219a584c

0a219a584cf8ec03c5e19a83f9dbb02ec14359b3

parent: 0079d39552

Unregistered key

Fabricio Anciães <Fabricio4p93@gmail.com> · 2025-09-20 19:47 UTC
committer: <noreply@github.com>

add ctrl+p and ctrl+n vim like keybinds to menu selection (#69)

Layout: unified · split

internal/selection_menu.go +2 −2
@@ -88,7 +88,7 @@ func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
8888 m.filter = m.filter[:len(m.filter)-1]
8989 updateFilter = true
9090 }
91 case "down", "tab":
91 case "down", "tab", "ctrl+n":
9292 // Move the selection cursor down
9393 if m.selected < len(m.filteredKeys)-1 {
9494 m.selected++
@@ -98,7 +98,7 @@ func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
9898 if m.selected >= m.scrollOffset+m.visibleItemsCount() {
9999 m.scrollOffset++
100100 }
101 case "up", "shift+tab":
101 case "up", "shift+tab", "ctrl+p":
102102 // Move the selection cursor up
103103 if m.selected > 0 {
104104 m.selected--