diff --git a/osu.Game/Input/ActionMappingInputManager.cs b/osu.Game/Input/ActionMappingInputManager.cs index db6561849c..c4489b644c 100644 --- a/osu.Game/Input/ActionMappingInputManager.cs +++ b/osu.Game/Input/ActionMappingInputManager.cs @@ -81,7 +81,7 @@ namespace osu.Game.Input { Binding validBinding; - if ((validBinding = mappings.Except(pressedBindings).LastOrDefault(m => m.Keys.CheckValid(state.Keyboard.Keys))) != null) + if ((validBinding = mappings.Except(pressedBindings).LastOrDefault(m => m.Keys.CheckValid(state.Keyboard.Keys, !allowConcurrentActions))) != null) { // store both the pressed combination and the resulting action, just in case the assignments change while we are actuated. pressedBindings.Add(validBinding); @@ -96,7 +96,7 @@ namespace osu.Game.Input { foreach (var binding in pressedBindings.ToList()) { - if (!binding.Keys.CheckValid(state.Keyboard.Keys)) + if (!binding.Keys.CheckValid(state.Keyboard.Keys, !allowConcurrentActions)) { // set data as KeyUp. state.Data = binding.GetAction(); diff --git a/osu.Game/Input/KeyCombination.cs b/osu.Game/Input/KeyCombination.cs index 67966b8935..1e8dff0a51 100644 --- a/osu.Game/Input/KeyCombination.cs +++ b/osu.Game/Input/KeyCombination.cs @@ -30,7 +30,13 @@ namespace osu.Game.Input Keys = stringRepresentation.Split(',').Select(s => (Key)int.Parse(s)); } - public bool CheckValid(IEnumerable keys) => !Keys.Except(keys).Any(); + public bool CheckValid(IEnumerable keys, bool requireExactMatch = false) + { + if (requireExactMatch) + return Keys.SequenceEqual(keys); + else + return !Keys.Except(keys).Any(); + } public bool Equals(KeyCombination other) {