diff --git a/RELEASE.md b/RELEASE.md index 102542c..12fa7b5 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -17,6 +17,7 @@ - STEAM+B will kill foreground if hold longer than 3s - Allow to configure `StartupProfile` in `SteamController.dll.config` - Increase joystick speed and key repeats in Desktop Mode +- Fix double presses of A(RETURN)/B(BACKSPACE) in Desktop mode ## 0.4.x diff --git a/SteamController/Profiles/DesktopProfile.cs b/SteamController/Profiles/DesktopProfile.cs index 297156c..e0ae8e3 100644 --- a/SteamController/Profiles/DesktopProfile.cs +++ b/SteamController/Profiles/DesktopProfile.cs @@ -41,14 +41,8 @@ namespace SteamController.Profiles EmulateMouseOnRStick(c); EmulateDPadArrows(c); - if (c.Steam.BtnA.Pressed()) - { - c.Keyboard.KeyPress(VirtualKeyCode.RETURN); - } - if (c.Steam.BtnB.Pressed()) - { - c.Keyboard.KeyPress(VirtualKeyCode.BACK); - } + c.Keyboard[VirtualKeyCode.RETURN] = c.Steam.BtnA; + c.Keyboard[VirtualKeyCode.BACK] = c.Steam.BtnB; return Status.Continue; } @@ -67,7 +61,6 @@ namespace SteamController.Profiles private void EmulateDPadArrows(Context c) { - c.Keyboard[VirtualKeyCode.RETURN] = c.Steam.BtnA; c.Keyboard[VirtualKeyCode.LEFT] = c.Steam.BtnDpadLeft; c.Keyboard[VirtualKeyCode.RIGHT] = c.Steam.BtnDpadRight; c.Keyboard[VirtualKeyCode.UP] = c.Steam.BtnDpadUp;