Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #3784 add support for using h,j,k,l in catalog command. #3797

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions cli/commands/catalog/tui/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ func newListKeyMap() list.KeyMap {
return list.KeyMap{
// Browsing.
CursorUp: key.NewBinding(
key.WithKeys("up", "ctrl+p"),
key.WithHelp("↑/ctrl+p", "move up"),
key.WithKeys("k", "up", "ctrl+p"),
key.WithHelp("k/↑/ctrl+p", "move up"),
),
CursorDown: key.NewBinding(
key.WithKeys("down", "ctrl+n"),
key.WithHelp("↓/ctrl+n", "move down"),
key.WithKeys("j", "down", "ctrl+n"),
key.WithHelp("j/↓/ctrl+n", "move down"),
),
PrevPage: key.NewBinding(
key.WithKeys("left", "pgup", "alt+v"),
key.WithHelp("←/pgup/alt+v", "prev page"),
key.WithKeys("h", "left", "pgup", "alt+v"),
key.WithHelp("h/←/pgup/alt+v", "prev page"),
),
NextPage: key.NewBinding(
key.WithKeys("right", "pgdown", "ctrl+v"),
key.WithHelp("→/pgdn/ctrl+v", "next page"),
key.WithKeys("l", "right", "pgdown", "ctrl+v"),
key.WithHelp("l/→/pgdn/ctrl+v", "next page"),
),
GoToStart: key.NewBinding(
key.WithKeys("home", "ctrl+a"),
Expand Down Expand Up @@ -177,20 +177,20 @@ func newPagerKeyMap() pagerKeyMap {
key.WithDisabled(),
),
Up: key.NewBinding(
key.WithKeys("up", "ctrl+p"),
key.WithHelp("↑/ctrl+p", "move up"),
key.WithKeys("k", "up", "ctrl+p"),
key.WithHelp("k/↑/ctrl+p", "move up"),
),
Down: key.NewBinding(
key.WithKeys("down", "ctrl+n"),
key.WithHelp("↓/ctrl+n", "move down"),
key.WithKeys("j", "down", "ctrl+n"),
key.WithHelp("j/↓/ctrl+n", "move down"),
),
PageDown: key.NewBinding(
key.WithKeys("right", "pgdown", "ctrl+v"),
key.WithHelp("→/pgdn/ctrl+v", "page down"),
key.WithKeys("l", "right", "pgdown", "ctrl+v"),
key.WithHelp("l/→/pgdn/ctrl+v", "page down"),
),
PageUp: key.NewBinding(
key.WithKeys("left", "pgup", "alt+v"),
key.WithHelp("←/pgup/alt+v", "page up"),
key.WithKeys("h", "left", "pgup", "alt+v"),
key.WithHelp("h/←/pgup/alt+v", "page up"),
),
},
help: help.New(),
Expand Down