From fccacad3a24c5fc995eae2917f1d2cca91ecbb8d Mon Sep 17 00:00:00 2001 From: Jestin Stoffel Date: Mon, 8 Jul 2019 10:50:19 -0500 Subject: [PATCH] Add vim keys as alternative to arrow key navigation --- src/Mapscii.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Mapscii.js b/src/Mapscii.js index dcdc113..e02459b 100644 --- a/src/Mapscii.js +++ b/src/Mapscii.js @@ -208,15 +208,19 @@ class Mapscii { this.zoomBy(-config.zoomStep); break; case 'left': + case 'h': this.moveBy(0, -8/Math.pow(2, this.zoom)); break; case 'right': + case 'l': this.moveBy(0, 8/Math.pow(2, this.zoom)); break; case 'up': + case 'k': this.moveBy(6/Math.pow(2, this.zoom), 0); break; case 'down': + case 'j': this.moveBy(-6/Math.pow(2, this.zoom), 0); break; case 'c':