diff --git a/WFInfo/Settings/ApplicationSettings.cs b/WFInfo/Settings/ApplicationSettings.cs index 8dfb64c9..c322cd33 100644 --- a/WFInfo/Settings/ApplicationSettings.cs +++ b/WFInfo/Settings/ApplicationSettings.cs @@ -48,7 +48,20 @@ public Point MainWindowLocation [JsonIgnore] public Key? ActivationKeyKey => Enum.TryParse(ActivationKey, out var res) ? res : (Key?)null; [JsonIgnore] - public MouseButton? ActivationMouseButton => Enum.TryParse(ActivationKey, out var res) ? res : (MouseButton?)null; + public MouseButton? ActivationMouseButton + { + get + { + var result = Enum.TryParse(ActivationKey, out var res) ? res : (MouseButton?)null; + if (result is MouseButton.Left || result is MouseButton.Right) + { + // Prevent Key.Left and Key.Right (arrow keys) from being misinterpreted as the mouse buttons. + // Using these mouse buttons as activation key is a bad idea anyway + return null; + } + return result; + } + } public Key DebugModifierKey { get; set; } = Key.LeftShift; public Key SearchItModifierKey { get; set; } = Key.OemTilde; public Key SnapitModifierKey { get; set; } = Key.LeftCtrl;