| 7887 | //----------------------------------------------------------------------------- |
| 7888 | |
| 7889 | ImGuiKeyData* ImGui::GetKeyData(ImGuiContext* ctx, ImGuiKey key) |
| 7890 | { |
| 7891 | ImGuiContext& g = *ctx; |
| 7892 | |
| 7893 | // Special storage location for mods |
| 7894 | if (key & ImGuiMod_Mask_) |
| 7895 | key = ConvertSingleModFlagToKey(ctx, key); |
| 7896 | |
| 7897 | #ifndef IMGUI_DISABLE_OBSOLETE_KEYIO |
| 7898 | IM_ASSERT(key >= ImGuiKey_LegacyNativeKey_BEGIN && key < ImGuiKey_NamedKey_END); |
| 7899 | if (IsLegacyKey(key) && g.IO.KeyMap[key] != -1) |
| 7900 | key = (ImGuiKey)g.IO.KeyMap[key]; // Remap native->imgui or imgui->native |
| 7901 | #else |
| 7902 | IM_ASSERT(IsNamedKey(key) && "Support for user key indices was dropped in favor of ImGuiKey. Please update backend & user code."); |
| 7903 | #endif |
| 7904 | return &g.IO.KeysData[key - ImGuiKey_KeysData_OFFSET]; |
| 7905 | } |
| 7906 | |
| 7907 | #ifndef IMGUI_DISABLE_OBSOLETE_KEYIO |
| 7908 | ImGuiKey ImGui::GetKeyIndex(ImGuiKey key) |
nothing calls this directly
no test coverage detected