MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/PositionBasedDynamics / GetKeyChordName

Method GetKeyChordName

extern/imgui/imgui.cpp:8631–8642  ·  view source on GitHub ↗

ImGuiMod_Shortcut is translated to either Ctrl or Super.

Source from the content-addressed store, hash-verified

8629
8630// ImGuiMod_Shortcut is translated to either Ctrl or Super.
8631void ImGui::GetKeyChordName(ImGuiKeyChord key_chord, char* out_buf, int out_buf_size)
8632{
8633 ImGuiContext& g = *GImGui;
8634 if (key_chord & ImGuiMod_Shortcut)
8635 key_chord = ConvertShortcutMod(key_chord);
8636 ImFormatString(out_buf, (size_t)out_buf_size, "%s%s%s%s%s",
8637 (key_chord & ImGuiMod_Ctrl) ? "Ctrl+" : "",
8638 (key_chord & ImGuiMod_Shift) ? "Shift+" : "",
8639 (key_chord & ImGuiMod_Alt) ? "Alt+" : "",
8640 (key_chord & ImGuiMod_Super) ? (g.IO.ConfigMacOSXBehaviors ? "Cmd+" : "Super+") : "",
8641 GetKeyName((ImGuiKey)(key_chord & ~ImGuiMod_Mask_)));
8642}
8643
8644// t0 = previous time (e.g.: g.Time - g.IO.DeltaTime)
8645// t1 = current time (e.g.: g.Time)

Callers

nothing calls this directly

Calls 2

ConvertShortcutModFunction · 0.85
ImFormatStringFunction · 0.85

Tested by

no test coverage detected