diff --git a/README.md b/README.md index 8c5e1e3..0cae915 100644 --- a/README.md +++ b/README.md @@ -117,13 +117,13 @@ type KeyMap struct { var DefaultKeyMap = KeyMap{ Up: key.NewBinding( - key.WithKeys("k", "up"), - key.WithHelp("↑/k", "move up"), + key.WithKeys("k", "up"), // actual keybindings + key.WithHelp("↑/k", "move up"), // corresponding help text ), - Down: key.Binding{ + Down: key.NewBinding( WithKeys("j", "down"), WithHelp("↓/j", "move down"), - }, + ), } func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { diff --git a/key/key.go b/key/key.go index 3ca02c0..4c2ba9a 100644 --- a/key/key.go +++ b/key/key.go @@ -9,13 +9,13 @@ // // var DefaultKeyMap = KeyMap{ // Up: key.NewBinding( -// key.WithKeys("k", "up"), -// key.WithHelp("↑/k", "move up"), +// key.WithKeys("k", "up"), // actual keybindings +// key.WithHelp("↑/k", "move up"), // corresponding help text // ), -// Down: key.Binding{ +// Down: key.NewBinding( // WithKeys("j", "down"), // WithHelp("↓/j", "move down"), -// }, +// ), // } // // func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {