MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / GetKeyChordName

Method GetKeyChordName

KBotExt/imgui/imgui.cpp:7967–7978  ·  view source on GitHub ↗

ImGuiMod_Shortcut is translated to either Ctrl or Super.

Source from the content-addressed store, hash-verified

7965
7966// ImGuiMod_Shortcut is translated to either Ctrl or Super.
7967void ImGui::GetKeyChordName(ImGuiKeyChord key_chord, char* out_buf, int out_buf_size)
7968{
7969 ImGuiContext& g = *GImGui;
7970 if (key_chord & ImGuiMod_Shortcut)
7971 key_chord = ConvertShortcutMod(key_chord);
7972 ImFormatString(out_buf, (size_t)out_buf_size, "%s%s%s%s%s",
7973 (key_chord & ImGuiMod_Ctrl) ? "Ctrl+" : "",
7974 (key_chord & ImGuiMod_Shift) ? "Shift+" : "",
7975 (key_chord & ImGuiMod_Alt) ? "Alt+" : "",
7976 (key_chord & ImGuiMod_Super) ? (g.IO.ConfigMacOSXBehaviors ? "Cmd+" : "Super+") : "",
7977 GetKeyName((ImGuiKey)(key_chord & ~ImGuiMod_Mask_)));
7978}
7979
7980// t0 = previous time (e.g.: g.Time - g.IO.DeltaTime)
7981// 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