Skip to content

Commit

Permalink
Shortcut(): fixed 8323a06 adding _Repeat to all Shortcut() calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Jan 17, 2024
1 parent 3b828d3 commit d7c2a0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit d7c2a0e

Please sign in to comment.