MCPcopy Create free account
hub / github.com/Wemino/MarkerPatch / GetKeyName

Method GetKeyName

include/imgui/imgui.cpp:9491–9502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9489IM_STATIC_ASSERT(ImGuiKey_NamedKey_COUNT == IM_COUNTOF(GKeyNames));
9490
9491const char* ImGui::GetKeyName(ImGuiKey key)
9492{
9493 if (key == ImGuiKey_None)
9494 return "None";
9495 IM_ASSERT(IsNamedKeyOrMod(key) && "Support for user key indices was dropped in favor of ImGuiKey. Please update backend and user code.");
9496 if (key & ImGuiMod_Mask_)
9497 key = ConvertSingleModFlagToKey(key);
9498 if (!IsNamedKey(key))
9499 return "Unknown";
9500
9501 return GKeyNames[key - ImGuiKey_NamedKey_BEGIN];
9502}
9503
9504// Return untranslated names: on macOS, Cmd key will show as Ctrl, Ctrl key will show as super.
9505// Lifetime of return value: valid until next call to same function.

Callers

nothing calls this directly

Calls 3

IsNamedKeyOrModFunction · 0.85
IsNamedKeyFunction · 0.85

Tested by

no test coverage detected