Fix AltGr key assignment and silence keyboard SetLed logs

This commit is contained in:
Babib3l
2026-03-18 17:12:33 +01:00
parent 32f603d7ad
commit 13c8b57063
4 changed files with 27 additions and 6 deletions

View File

@@ -33,6 +33,13 @@ namespace Ryujinx.Input.Assigner
public Button? GetPressedButton()
{
// On some layouts (for example AltGr on Windows), Right Alt is reported as Ctrl+Alt.
// Prefer AltRight in that case so the binding reflects the physical key used.
if (_keyboardState.IsPressed(Key.ControlLeft) && _keyboardState.IsPressed(Key.AltRight))
{
return !ShouldCancel() ? new Button(Key.AltRight) : null;
}
Button? keyPressed = null;
for (Key key = Key.Unknown; key < Key.Count; key++)