Skip to content

Commit

Permalink
feat(menu): C-j/k to navigate menu (#4945)
Browse files Browse the repository at this point in the history
  • Loading branch information
fannheyward authored Mar 19, 2024
1 parent 34d3d9d commit d299c66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/model/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ export default class Menu {
this.addKeys('<C-b>', async () => {
await this.win.scrollBackward()
})
this.addKeys(['j', '<down>', '<tab>', '<C-n>'], () => {
this.addKeys(['j', '<C-j>', '<down>', '<tab>', '<C-n>'], () => {
// next
let idx = this.currIndex == this.total - 1 ? 0 : this.currIndex + 1
setCursorIndex(idx)
})
this.addKeys(['k', '<up>', '<s-tab>', '<C-p>'], () => {
this.addKeys(['k', '<C-k>', '<up>', '<s-tab>', '<C-p>'], () => {
// previous
let idx = this.currIndex == 0 ? this.total - 1 : this.currIndex - 1
setCursorIndex(idx)
Expand Down

0 comments on commit d299c66

Please sign in to comment.