mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-01-20 15:30:28 +01:00
Allow to Overwrite keyboard and mouse button state
This commit is contained in:
parent
801f32a719
commit
142b8cc2e9
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue