From 8149bf28c9d322580502161bcd8b04f71d9f8c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= Date: Sun, 27 Nov 2022 14:21:46 +0100 Subject: [PATCH] Move `STEAM+DPadUp` into `AdditionalShortcuts` --- README.md | 6 +++--- .../Profiles/DefaultGuideShortcutsProfile.cs | 11 ++++++++++- SteamController/Profiles/DefaultShortcutsProfile.cs | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a858ce9..5eaf421 100644 --- a/README.md +++ b/README.md @@ -206,6 +206,7 @@ and disable itself for the duration of game play. This allows to use `Steam Inpu | STEAM + DPad Right | RETURN | RETURN | | RETURN | | STEAM + DPad Down | TAB | TAB | | TAB | | STEAM + DPad Left | ESCAPE | ESCAPE | | ESCAPE | +| STEAM + DPad Up | CTRL + ALT + U | CTRL + ALT + U | | CTRL + ALT + U | | STEAM + Left Pad | Mouse Scroll | Mouse Scroll | | Mouse Scroll | | STEAM + Left Joystick | Mouse Scroll | Mouse Scroll | | Mouse Scroll | | STEAM + Right Joystick | Mouse Trackpad | Mouse Trackpad | | Mouse Trackpad | @@ -214,7 +215,6 @@ and disable itself for the duration of game play. This allows to use `Steam Inpu | STEAM + R2 | Mouse Left Click | Mouse Left Click | | Mouse Left Click | | STEAM + Left Pad Press | Mouse Right Click | Mouse Right Click | | Mouse Right Click | | STEAM + Right Pad Press | Mouse Left Click | Mouse Left Click | | Mouse Left Click | -| STEAM + Up Pad Press | Ctrl + Alt + U | Ctrl + Alt + U | | | | Left Pad | Mouse Scroll | | | | | Left Joystick | Mouse Scroll | | | | | Right Joystick | Mouse Trackpad | | | | @@ -260,8 +260,8 @@ To configure the hotkey in Lossless Scaling: 1. Launch Lossless Scaling 1. Open "Settings" 1. Select the "Scale hotkey" -1. Press "Steam+DPad Up" -1. Verify that the hotkey was set to "Ctrl + Alt + U" +1. Press "STEAM + DPad Up" +1. Verify that the hotkey was set to "CTRL + ALT + U" 1. Close the settings dialog ## 5. Risks diff --git a/SteamController/Profiles/DefaultGuideShortcutsProfile.cs b/SteamController/Profiles/DefaultGuideShortcutsProfile.cs index 4d8d3c1..8474de5 100644 --- a/SteamController/Profiles/DefaultGuideShortcutsProfile.cs +++ b/SteamController/Profiles/DefaultGuideShortcutsProfile.cs @@ -103,12 +103,21 @@ namespace SteamController.Profiles { c.Keyboard.KeyPress(VirtualKeyCode.ESCAPE); } + } + + protected override bool AdditionalShortcuts(Context c) + { + if (base.AdditionalShortcuts(c)) + return true; // Additional binding for tool hotkeys (Lossless Fullscreen is nice) - if (c.Steam.BtnDpadUp.HoldOnce(ShortcutConsumed)) + if (c.Steam.BtnDpadUp.Pressed()) { c.Keyboard.KeyPress(new VirtualKeyCode[] { VirtualKeyCode.LCONTROL, VirtualKeyCode.LMENU }, VirtualKeyCode.VK_U); + return true; } + + return false; } protected void EmulateScrollOnLPad(Context c) diff --git a/SteamController/Profiles/DefaultShortcutsProfile.cs b/SteamController/Profiles/DefaultShortcutsProfile.cs index b99ec0a..eb382a2 100644 --- a/SteamController/Profiles/DefaultShortcutsProfile.cs +++ b/SteamController/Profiles/DefaultShortcutsProfile.cs @@ -55,7 +55,7 @@ namespace SteamController.Profiles return Status.Continue; } - private bool AdditionalShortcuts(Context c) + protected virtual bool AdditionalShortcuts(Context c) { if (c.Steam.BtnMenu.Pressed()) {