diff --git a/Source/Sidebar/CommandInput.h b/Source/Sidebar/CommandInput.h index 05836ecd8..e7d00ae55 100644 --- a/Source/Sidebar/CommandInput.h +++ b/Source/Sidebar/CommandInput.h @@ -790,9 +790,14 @@ class CommandInput final return true; } if (key.getKeyCode() == KeyPress::escapeKey) { - if (auto* cnv = editor->getCurrentCanvas()) + if (auto* cnv = editor->getCurrentCanvas()) { + if (cnv->selectedComponents.getNumSelected() == 0) { + editor->commandManager.invokeDirectly(CommandIDs::ShowCommandInput, false); + return true; + } cnv->deselectAll(); - updateCommandInputTarget(); + updateCommandInputTarget(); + } return true; } if (key.getKeyCode() == KeyPress::spaceKey) {