summaryrefslogtreecommitdiff
path: root/internal/tui
diff options
context:
space:
mode:
Diffstat (limited to 'internal/tui')
-rw-r--r--internal/tui/common/keys.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/internal/tui/common/keys.go b/internal/tui/common/keys.go
index 1111def..805a74a 100644
--- a/internal/tui/common/keys.go
+++ b/internal/tui/common/keys.go
@@ -65,10 +65,10 @@ func (k KeyMap) DashboardFullHelp() [][]key.Binding {
{k.One, k.Two, k.Three, k.Four, k.Five, k.Six},
controls,
{
- key.NewBinding(key.WithKeys("left/right"), key.WithHelp("left/right", "tab")),
- key.NewBinding(key.WithKeys("h/l"), key.WithHelp("h/l", "tab")),
- key.NewBinding(key.WithKeys("j/k"), key.WithHelp("j/k", "scroll")),
- key.NewBinding(key.WithKeys("up/down"), key.WithHelp("up/down", "scroll")),
+ helpTextBinding("left/right", "tab"),
+ helpTextBinding("h/l", "tab"),
+ helpTextBinding("j/k", "scroll"),
+ helpTextBinding("up/down", "scroll"),
},
}
}
@@ -77,3 +77,7 @@ func (k KeyMap) DashboardFullHelp() [][]key.Binding {
func (k KeyMap) PickerShortHelp() []key.Binding {
return []key.Binding{k.Enter, k.Refresh, k.Esc}
}
+
+func helpTextBinding(keyText, desc string) key.Binding {
+ return key.NewBinding(key.WithHelp(keyText, desc))
+}