mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-03-19 03:04:50 +01:00
Increase joystick speed and key repeats in Desktop Mode
This commit is contained in:
parent
aeb035da5d
commit
738b9b72f6
|
|
@ -16,6 +16,7 @@
|
|||
- Steam Games detection also works for X360 Controller mode
|
||||
- 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
|
||||
|
||||
## 0.4.x
|
||||
|
||||
|
|
|
|||
|
|
@ -7,9 +7,7 @@ namespace SteamController
|
|||
public const double JoystickToMouseSensitivity = 1200;
|
||||
public const double PadToMouseSensitivity = 150;
|
||||
public const double PadToWhellSensitivity = 4;
|
||||
public const double ThumbToWhellSensitivity = 4;
|
||||
public static readonly TimeSpan ThumbToWhellFirstRepeat = TimeSpan.FromMilliseconds(30 * ThumbToWhellSensitivity);
|
||||
public static readonly TimeSpan ThumbToWhellRepeat = TimeSpan.FromMilliseconds(30 * ThumbToWhellSensitivity);
|
||||
public const double ThumbToWhellSensitivity = 20;
|
||||
|
||||
public Devices.SteamController Steam { get; private set; }
|
||||
public Devices.Xbox360Controller X360 { get; private set; }
|
||||
|
|
@ -81,7 +79,7 @@ namespace SteamController
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceLine("Manager: {0}. Exception: {1}", e);
|
||||
TraceLine("Manager: {0}. Exception: {1}", manager, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ namespace SteamController.Devices
|
|||
{
|
||||
public class KeyboardController : IDisposable
|
||||
{
|
||||
public static readonly TimeSpan FirstRepeat = TimeSpan.FromMilliseconds(75);
|
||||
public static readonly TimeSpan NextRepeats = TimeSpan.FromMilliseconds(150);
|
||||
public static readonly TimeSpan FirstRepeat = TimeSpan.FromMilliseconds(400);
|
||||
public static readonly TimeSpan NextRepeats = TimeSpan.FromMilliseconds(45);
|
||||
|
||||
InputSimulator simulator = new InputSimulator();
|
||||
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ namespace SteamController.Devices
|
|||
public class SteamButton : SteamAction
|
||||
{
|
||||
public static readonly TimeSpan DefaultHoldDuration = TimeSpan.FromMilliseconds(10);
|
||||
public static readonly TimeSpan DefaultFirstHold = TimeSpan.FromMilliseconds(75);
|
||||
public static readonly TimeSpan DefaultRepeatHold = TimeSpan.FromMilliseconds(150);
|
||||
public static readonly TimeSpan DefaultFirstHold = TimeSpan.FromMilliseconds(400);
|
||||
public static readonly TimeSpan DefaultRepeatHold = TimeSpan.FromMilliseconds(45);
|
||||
|
||||
private bool rawValue, rawLastValue;
|
||||
|
||||
|
|
|
|||
|
|
@ -83,12 +83,12 @@ namespace SteamController.Profiles
|
|||
c.Keyboard.KeyPress(VirtualKeyCode.LWIN, VirtualKeyCode.SNAPSHOT);
|
||||
}
|
||||
|
||||
if (c.Steam.BtnVirtualLeftThumbUp.HoldRepeat(ShortcutConsumed))
|
||||
if (c.Steam.BtnVirtualLeftThumbUp.JustPressed() || c.Steam.BtnVirtualLeftThumbUp.HoldRepeat(ShortcutConsumed))
|
||||
{
|
||||
WindowsSettingsBrightnessController.Increase(5);
|
||||
}
|
||||
|
||||
if (c.Steam.BtnVirtualLeftThumbDown.HoldRepeat(ShortcutConsumed))
|
||||
if (c.Steam.BtnVirtualLeftThumbDown.JustPressed() || c.Steam.BtnVirtualLeftThumbDown.HoldRepeat(ShortcutConsumed))
|
||||
{
|
||||
WindowsSettingsBrightnessController.Increase(-5);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,21 +55,13 @@ namespace SteamController.Profiles
|
|||
|
||||
private void EmulateScrollOnLStick(Context c)
|
||||
{
|
||||
if (c.Steam.BtnVirtualLeftThumbUp.HoldRepeat(Context.ThumbToWhellFirstRepeat, Context.ThumbToWhellRepeat, Consumed))
|
||||
if (c.Steam.LeftThumbX)
|
||||
{
|
||||
c.Mouse.VerticalScroll(Context.ThumbToWhellSensitivity);
|
||||
c.Mouse.HorizontalScroll(c.Steam.LeftThumbX.DeltaValue * Context.ThumbToWhellSensitivity);
|
||||
}
|
||||
else if (c.Steam.BtnVirtualLeftThumbDown.HoldRepeat(Context.ThumbToWhellFirstRepeat, Context.ThumbToWhellRepeat, Consumed))
|
||||
if (c.Steam.LeftThumbY)
|
||||
{
|
||||
c.Mouse.VerticalScroll(-Context.ThumbToWhellSensitivity);
|
||||
}
|
||||
else if (c.Steam.BtnVirtualLeftThumbLeft.HoldRepeat(Context.ThumbToWhellFirstRepeat, Context.ThumbToWhellRepeat, Consumed))
|
||||
{
|
||||
c.Mouse.HorizontalScroll(-Context.ThumbToWhellSensitivity);
|
||||
}
|
||||
else if (c.Steam.BtnVirtualLeftThumbRight.HoldRepeat(Context.ThumbToWhellFirstRepeat, Context.ThumbToWhellRepeat, Consumed))
|
||||
{
|
||||
c.Mouse.HorizontalScroll(Context.ThumbToWhellSensitivity);
|
||||
c.Mouse.VerticalScroll(c.Steam.LeftThumbY.DeltaValue * Context.ThumbToWhellSensitivity);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue