From e3cd88e2747b2264bc48a91dc2de90685421bbb5 Mon Sep 17 00:00:00 2001 From: Joe Westcott Date: Fri, 31 Oct 2025 17:01:46 +0000 Subject: [PATCH] XInputProKeyboard: amend location of touchStrip --- .../PlasticBand/Devices/ProKeyboard/XInputProKeyboard.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Packages/com.thenathannator.plasticband/PlasticBand/Devices/ProKeyboard/XInputProKeyboard.cs b/Packages/com.thenathannator.plasticband/PlasticBand/Devices/ProKeyboard/XInputProKeyboard.cs index fe380bd..1faf5bc 100644 --- a/Packages/com.thenathannator.plasticband/PlasticBand/Devices/ProKeyboard/XInputProKeyboard.cs +++ b/Packages/com.thenathannator.plasticband/PlasticBand/Devices/ProKeyboard/XInputProKeyboard.cs @@ -77,15 +77,17 @@ internal unsafe struct XInputProKeyboardState : IInputStateTypeInfo public byte velocity5; [InputControl(name = "overdrive", layout = "Button", bit = 7)] - // The touchstrip isn't available through XInput, but it has to be there for ProKeyboard - // These bits are unused, so we place it here - [InputControl(name = "touchStrip", layout = "Axis", format = "BIT", sizeInBits = 7)] public byte overdrive; // TODO: The normalization here needs verification [InputControl(name = "analogPedal", layout = "Axis", format = "BIT", sizeInBits = 7, parameters = "normalize,normalizeMin=1,normalizeMax=0,normalizeZero=1")] [InputControl(name = "digitalPedal", layout = "Button", bit = 7)] public byte pedal; + + // Bytes after this point are not reported via XInput on Windows. + + [InputControl(name = "touchStrip", layout = "Axis", format = "BIT", sizeInBits = 7)] + public byte touchPad; } [InputControlLayout(stateType = typeof(XInputProKeyboardState), displayName = "XInput Rock Band Pro Keyboard")]