| 9489 | IM_STATIC_ASSERT(ImGuiKey_NamedKey_COUNT == IM_COUNTOF(GKeyNames)); |
| 9490 | |
| 9491 | const 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. |
nothing calls this directly
no test coverage detected