aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2024-08-15 16:16:05 +0200
committer0neGal <mail@0negal.com>2024-08-15 23:00:48 +0200
commit7403086ce7d2a9d3b68801dc4c2135f5766b8d60 (patch)
treee15b23fedfed2f8d1020d75fe4761495e332bdad
parenta7ae187a21e15a7377cf83f91a11f49030c7b1f7 (diff)
downloadViper-7403086ce7d2a9d3b68801dc4c2135f5766b8d60.tar.gz
Viper-7403086ce7d2a9d3b68801dc4c2135f5766b8d60.zip
support SteamDeck bumper buttons in desktop layoutgamepad-support
-rw-r--r--src/app/js/gamepad.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/app/js/gamepad.js b/src/app/js/gamepad.js
index 1f65cbe..69ca13f 100644
--- a/src/app/js/gamepad.js
+++ b/src/app/js/gamepad.js
@@ -315,8 +315,14 @@ window.addEventListener("keyup", (e) => {
// perform the relevant action for the key that was pressed
switch(e.code) {
- case "KeyQ": launcher.relative_section("left"); break;
- case "KeyE": launcher.relative_section("right"); break;
+ // the second and third cases here are for SteamDeck bumper
+ // button support whilst inside the desktop layout
+ case "KeyQ":
+ case "ControlLeft": case "ControlRight":
+ launcher.relative_section("left"); break;
+ case "KeyE":
+ case "AltLeft": case "AltRight":
+ launcher.relative_section("right"); break;
case "Space": return selection_el
.classList.remove("keyboard-selecting");