From 8067165632de1daef8bb7aef011cf6dd6688dd10 Mon Sep 17 00:00:00 2001 From: noriah Date: Sun, 25 Dec 2022 09:45:01 -0800 Subject: [PATCH] change keys for bar changes in display. --- graphic/display.go | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/graphic/display.go b/graphic/display.go index 4fd95e3..c740d90 100644 --- a/graphic/display.go +++ b/graphic/display.go @@ -177,17 +177,6 @@ func (d *Display) inputProcessor() { switch ev.Type { case termbox.EventKey: switch ev.Key { - case termbox.KeyArrowUp: - d.AdjustSizes(1, 0) - - case termbox.KeyArrowRight: - d.AdjustSizes(0, 1) - - case termbox.KeyArrowDown: - d.AdjustSizes(-1, 0) - - case termbox.KeyArrowLeft: - d.AdjustSizes(0, -1) case termbox.KeySpace: d.SetDrawType(d.drawType + 1) @@ -197,6 +186,18 @@ func (d *Display) inputProcessor() { default: switch ev.Ch { + case 'w', 'W': + d.AdjustSizes(1, 0) + + case 'd', 'D': + d.AdjustSizes(0, 1) + + case 's', 'S': + d.AdjustSizes(-1, 0) + + case 'a', 'A': + d.AdjustSizes(0, -1) + case 'i', 'I': d.SetInvertDraw(!d.invertDraw)