diff options
author | 0neGal <mail@0negal.com> | 2024-06-20 00:00:21 +0200 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2024-06-20 00:01:41 +0200 |
commit | d3e8bcc645a16fbbcf2893d2b077c1e104f30a0a (patch) | |
tree | 8d857ca9fa7dc825227f15f7d796734c8b89c84e /src | |
parent | 3748c549677ed868f6c19e9eb5e6382a1a06376e (diff) | |
download | Viper-d3e8bcc645a16fbbcf2893d2b077c1e104f30a0a.tar.gz Viper-d3e8bcc645a16fbbcf2893d2b077c1e104f30a0a.zip |
allow navigating around on a keyboard with HJKL
Diffstat (limited to 'src')
-rw-r--r-- | src/app/js/gamepad.js | 8 |
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") } }) |