From d7c2a0e38f48e7d162405452dbb996438971b34c Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 17 Jan 2024 18:19:00 +0100 Subject: [PATCH] Shortcut(): fixed 8323a06 adding _Repeat to all Shortcut() calls. --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index d4c5e754..6ceee225 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -9432,7 +9432,7 @@ bool ImGui::Shortcut(ImGuiKeyChord key_chord, ImGuiID owner_id, ImGuiInputFlags // Default repeat behavior for Shortcut() // So e.g. pressing Ctrl+W and releasing Ctrl while holding W will not trigger the W shortcut. - if ((flags & ImGuiInputFlags_RepeatUntilMask_) == 0) + if ((flags & ImGuiInputFlags_Repeat) != 0 && (flags & ImGuiInputFlags_RepeatUntilMask_) == 0) flags |= ImGuiInputFlags_RepeatUntilKeyModsChange; if (!IsKeyChordPressed(key_chord, owner_id, flags))