diff --git a/Source/MetaCoreEditor/Private/MetaCoreBuiltinEditorModule.cpp b/Source/MetaCoreEditor/Private/MetaCoreBuiltinEditorModule.cpp index fbc44e3..3155305 100644 --- a/Source/MetaCoreEditor/Private/MetaCoreBuiltinEditorModule.cpp +++ b/Source/MetaCoreEditor/Private/MetaCoreBuiltinEditorModule.cpp @@ -742,12 +742,20 @@ void MetaCoreReimportProjectAsset(MetaCoreEditorContext& editorContext, const Me } } -void MetaCoreHandleGlobalEditorShortcuts(MetaCoreEditorContext& editorContext) { +[[nodiscard]] bool MetaCoreCanHandleGlobalEditorShortcuts() { const ImGuiIO& io = ImGui::GetIO(); - if (io.WantTextInput) { + return !io.WantTextInput && + !io.WantCaptureKeyboard && + !ImGui::IsAnyItemActive() && + !ImGui::IsPopupOpen(nullptr, ImGuiPopupFlags_AnyPopup); +} + +void MetaCoreHandleGlobalEditorShortcuts(MetaCoreEditorContext& editorContext) { + if (!MetaCoreCanHandleGlobalEditorShortcuts()) { return; } + const ImGuiIO& io = ImGui::GetIO(); const bool ctrlDown = io.KeyCtrl; const bool shiftDown = io.KeyShift;