From 031cd90048063e4f6a23de3eb9ca50a3eea8e66b Mon Sep 17 00:00:00 2001 From: Babib3l Date: Wed, 8 Apr 2026 18:19:19 +0200 Subject: [PATCH] Log keyboard UI events only on key state changes --- src/Ryujinx/Input/AvaloniaKeyboardDriver.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx/Input/AvaloniaKeyboardDriver.cs b/src/Ryujinx/Input/AvaloniaKeyboardDriver.cs index c98090f39..61d233992 100644 --- a/src/Ryujinx/Input/AvaloniaKeyboardDriver.cs +++ b/src/Ryujinx/Input/AvaloniaKeyboardDriver.cs @@ -209,6 +209,8 @@ namespace Ryujinx.Ava.Input ConfigPhysicalKey physicalKey = GetPhysicalInputKey(args, semanticKey, out PhysicalKeySource physicalKeySource); bool semanticWasPressed = _semanticPressedKeys.Contains(resolvedSemanticKey); bool physicalWasPressed = _physicalPressedKeys.Contains(physicalKey); + bool semanticStateChanged = resolvedSemanticKey is not Key.Unknown and not Key.Unbound && semanticWasPressed != isPressed; + bool physicalStateChanged = physicalKey is not ConfigPhysicalKey.Unknown and not ConfigPhysicalKey.Unbound && physicalWasPressed != isPressed; bool bufferedSemanticPress = false; bool bufferedPhysicalPress = false; @@ -240,7 +242,8 @@ namespace Ryujinx.Ava.Input _observedPhysicalKeysBySemanticKey[semanticKey] = physicalKey; } - if (ConfigurationState.Instance.Logger.EnableAvaloniaLog) + if (ConfigurationState.Instance.Logger.EnableAvaloniaLog && + (semanticStateChanged || physicalStateChanged)) { Logger.Info?.Print( LogClass.UI,