diff --git a/osu.Framework/Input/Bindings/KeyBindingContainer.cs b/osu.Framework/Input/Bindings/KeyBindingContainer.cs index ebb4075d94..2c8b4158f5 100644 --- a/osu.Framework/Input/Bindings/KeyBindingContainer.cs +++ b/osu.Framework/Input/Bindings/KeyBindingContainer.cs @@ -204,7 +204,9 @@ private bool handleNewPressed(InputState state, InputKey newKey, Vector2? scroll { // if the current key pressed was a modifier, only handle modifier-only bindings. // lambda expression is used so that the delegate is cached (see: https://github.com/dotnet/roslyn/issues/5835) - newlyPressed = newlyPressed.Where(b => b.KeyCombination.Keys.All(KeyCombination.IsModifierKey)); + // TODO: remove when we switch to .NET 7. + // ReSharper disable once ConvertClosureToMethodGroup + newlyPressed = newlyPressed.Where(b => b.KeyCombination.Keys.All(key => KeyCombination.IsModifierKey(key))); } // we want to always handle bindings with more keys before bindings with less.