Repository navigation
[editor] match stable behavior when pressing escape while on anything but the select tool #38888
|
brought up during a lazer mapping discussion on the official mappers guild discord. probably just an oversight, but one that is very annoying if you built up a certain muscle memory. visual demonstration and more in depth explanation in video below. 2026-09-21.14-08-21.1.mp4 |
Answered by
LittleEndu
Sep 24, 2026
Replies: 1 comment 3 replies
|
Something like this would work but it looks just ugly enough that I don't want to PR this index 5a7864f7d5..81e0d14035 100644
--- a/osu.Game/Screens/Edit/Editor.cs
+++ b/osu.Game/Screens/Edit/Editor.cs
@@ -44,6 +44,7 @@
using osu.Game.Overlays.OSD;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Edit;
+using osu.Game.Rulesets.Edit.Tools;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Screens.Backgrounds;
@@ -119,6 +120,9 @@ protected bool HasUnsavedChanges
[Resolved]
private RealmAccess realm { get; set; }
+ [Resolved]
+ private GlobalActionContainer globalActionContainer { get; set; }
+
public readonly Bindable<EditorScreenMode> Mode = new Bindable<EditorScreenMode>();
public IBindable<bool> SamplePlaybackDisabled => samplePlaybackDisabled;
@@ -834,6 +838,15 @@ public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
@@ -834,6 +838,15 @@ public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
double lastObjectTime = editorBeatmap.GetLastObjectTime();
clock.Seek(clock.CurrentTime == lastObjectTime ? clock.TrackLength : lastObjectTime);
return true;
+
+ case GlobalAction.Back:
+ if (Mode.Value == EditorScreenMode.Compose && currentScreen.Dependencies.Get<HitObjectComposer>().BlueprintContainer.CurrentTool is not SelectTool)
+ {
+ globalActionContainer.TriggerPressed(GlobalAction.EditorSelectTool);
+ return true;
+ }
+
+ break;
}
return false; |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah, I thought something in there needs to become a
IKeyBindingHandler<GlobalAction>. I'll see about it later today after workedit: see #38921