From 7403086ce7d2a9d3b68801dc4c2135f5766b8d60 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Thu, 15 Aug 2024 16:16:05 +0200 Subject: support SteamDeck bumper buttons in desktop layout --- src/app/js/gamepad.js | 10 ++++++++-- 1 file 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"); -- cgit v1.2.3