From 673eb4c49192b4bc96b7af0a053a52788dfa53be Mon Sep 17 00:00:00 2001 From: Jussi Tiira Date: Wed, 20 Oct 2021 19:05:16 +0000 Subject: [PATCH] vim style vertical movement --- ui/keybindings.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ui/keybindings.go b/ui/keybindings.go index b17c489..56c5717 100644 --- a/ui/keybindings.go +++ b/ui/keybindings.go @@ -30,11 +30,21 @@ func setKeyBinding(c *controller, g *gocui.Gui) error { return err } + err = g.SetKeybinding("", 'k', gocui.ModNone, c.cursorUp) + if err != nil { + return err + } + err = g.SetKeybinding("", gocui.KeyArrowDown, gocui.ModNone, c.cursorDown) if err != nil { return err } + err = g.SetKeybinding("", 'j', gocui.ModNone, c.cursorDown) + if err != nil { + return err + } + err = g.SetKeybinding("", gocui.KeyArrowLeft, gocui.ModNone, c.cursorLeft) if err != nil { return err