diff --git a/src/olympic/studio/applib/src/renamefile.cpp b/src/olympic/studio/applib/src/renamefile.cpp index b4c633c7..24053fc4 100644 --- a/src/olympic/studio/applib/src/renamefile.cpp +++ b/src/olympic/studio/applib/src/renamefile.cpp @@ -50,8 +50,10 @@ void RenameFile::draw(StudioContext &ctx) noexcept { ImGui::SetKeyboardFocusHere(); } ig::InputText("Name", m_name); + auto const nameInputFocused = ImGui::IsItemFocused(); ImGui::Text("%s%s", m_path.c_str(), m_name.c_str()); - if (ig::PopupControlsOkCancel(m_open) == ig::PopupResponse::OK) { + if (ig::PopupControlsOkCancel(m_open) == ig::PopupResponse::OK || + (nameInputFocused && ImGui::IsKeyPressed(ImGuiKey_Enter))) { moveFile.emit(m_oldPath, m_path + m_name); close(); }