MCPcopy Create free account
hub / github.com/cinder/Cinder / GetKeyName

Method GetKeyName

src/imgui/imgui.cpp:9264–9275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9262IM_STATIC_ASSERT(ImGuiKey_NamedKey_COUNT == IM_ARRAYSIZE(GKeyNames));
9263
9264const char* ImGui::GetKeyName(ImGuiKey key)
9265{
9266 if (key == ImGuiKey_None)
9267 return "None";
9268 IM_ASSERT(IsNamedKeyOrMod(key) && "Support for user key indices was dropped in favor of ImGuiKey. Please update backend and user code.");
9269 if (key & ImGuiMod_Mask_)
9270 key = ConvertSingleModFlagToKey(key);
9271 if (!IsNamedKey(key))
9272 return "Unknown";
9273
9274 return GKeyNames[key - ImGuiKey_NamedKey_BEGIN];
9275}
9276
9277// Return untranslated names: on macOS, Cmd key will show as Ctrl, Ctrl key will show as super.
9278// 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