diff --git a/SteamController/Devices/KeyboardController.cs b/SteamController/Devices/KeyboardController.cs index 46d8759..13baeb5 100644 --- a/SteamController/Devices/KeyboardController.cs +++ b/SteamController/Devices/KeyboardController.cs @@ -114,6 +114,14 @@ namespace SteamController.Devices } } + public void Overwrite(VirtualKeyCode key, bool value) + { + if (value) + this[key] = true; + else + keyCodes.Remove(key); + } + public void KeyPress(params VirtualKeyCode[] keyCodes) { Safe(() => simulator.Keyboard.KeyPress(keyCodes)); diff --git a/SteamController/Devices/MouseController.cs b/SteamController/Devices/MouseController.cs index ed08a05..34a593e 100644 --- a/SteamController/Devices/MouseController.cs +++ b/SteamController/Devices/MouseController.cs @@ -239,6 +239,14 @@ namespace SteamController.Devices } } + public void Overwrite(Button button, bool value) + { + if (value) + mouseButtons.Add(button); + else + mouseButtons.Remove(button); + } + public void MoveBy(double pixelDeltaX, double pixelDeltaY) { movedX.Add(pixelDeltaX);