Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ROGAlly inputs #801

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 7 additions & 33 deletions HandheldCompanion/Devices/ASUS/ROGAlly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,55 +206,29 @@ private void HandleEvent(byte key)
// get button
var button = keyMapping[key];

// HID Report Item = hex = decimal
// Left or right paddle = A5 = 165
// Left OEM key = A6 = 166
// Right OEM key = 38 = 56
// Right OEM key hold = A7 and A8 = 167 and 168

switch (key)
{
case 236:
return;

case 0:
{
KeyRelease(ButtonFlags.OEM3);
}
return;

case 56:
case 166:
{
// OEM1 and OEM2 key needs a key press delay based on emulated controller
Task.Run(async () =>
{
KeyPress(button);
await Task.Delay(KeyPressDelay);
KeyRelease(button);
});
}
break;

case 165:
case 167:
case 167: // Armory crate: Hold
KeyPress(button);
break;

case 168:
case 168: // Armory crate: Hold, released
KeyRelease(button);
break;

default:
case 56: // Armory crate: Click
case 165: // Back paddles: Click
case 166: // Command center: Click
{
Task.Run(async () =>
{
KeyPress(button);
await Task.Delay(20);
await Task.Delay(KeyPressDelay);
KeyRelease(button);
});
}
break;
}
}
}
}
Loading