aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2024-06-20 00:00:21 +0200
committer0neGal <mail@0negal.com>2024-06-20 00:01:41 +0200
commitd3e8bcc645a16fbbcf2893d2b077c1e104f30a0a (patch)
tree8d857ca9fa7dc825227f15f7d796734c8b89c84e
parent3748c549677ed868f6c19e9eb5e6382a1a06376e (diff)
downloadViper-d3e8bcc645a16fbbcf2893d2b077c1e104f30a0a.tar.gz
Viper-d3e8bcc645a16fbbcf2893d2b077c1e104f30a0a.zip
allow navigating around on a keyboard with HJKL
-rw-r--r--src/app/js/gamepad.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/app/js/gamepad.js b/src/app/js/gamepad.js
index 789b27f..134a486 100644
--- a/src/app/js/gamepad.js
+++ b/src/app/js/gamepad.js
@@ -296,10 +296,10 @@ window.addEventListener("keydown", (e) => {
case "Enter": return select();
// move selection
- case "ArrowUp": return navigate.move("up")
- case "ArrowDown": return navigate.move("down")
- case "ArrowLeft": return navigate.move("left")
- case "ArrowRight": return navigate.move("right")
+ case "KeyK": case "ArrowUp": return navigate.move("up")
+ case "KeyJ": case "ArrowDown": return navigate.move("down")
+ case "KeyH": case "ArrowLeft": return navigate.move("left")
+ case "KeyL": case "ArrowRight": return navigate.move("right")
}
})