Skip to content

Commit

Permalink
feat: add keybinding <shift>+<tab> to go back
Browse files Browse the repository at this point in the history
  • Loading branch information
leg100 committed May 3, 2024
1 parent d06d8e0 commit 7bb8c2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions internal/tui/keys/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type global struct {
Runs key.Binding
Tasks key.Binding
Logs key.Binding
Escape key.Binding
Back key.Binding
Enter key.Binding
Select key.Binding
SelectAll key.Binding
Expand Down Expand Up @@ -41,9 +41,9 @@ var Global = global{
key.WithKeys("l"),
key.WithHelp("l", "logs"),
),
Escape: key.NewBinding(
key.WithKeys("esc", "`"),
key.WithHelp("esc/`", "back"),
Back: key.NewBinding(
key.WithKeys("esc", "`", "shift+tab"),
key.WithHelp("esc/`/shift+tab", "back"),
),
Enter: key.NewBinding(
key.WithKeys("enter"),
Expand Down
2 changes: 1 addition & 1 deletion internal/tui/top/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
"Quit pug",
tea.Quit,
)
case key.Matches(msg, keys.Global.Escape):
case key.Matches(msg, keys.Global.Back):
// <esc> closes help or goes back to last page
if m.showHelp {
m.showHelp = false
Expand Down

0 comments on commit 7bb8c2b

Please sign in to comment.