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

Method GetKeyData

KBotExt/imgui/imgui.cpp:7889–7905  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7887//-----------------------------------------------------------------------------
7888
7889ImGuiKeyData* 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
7908ImGuiKey ImGui::GetKeyIndex(ImGuiKey key)

Callers

nothing calls this directly

Calls 3

IsLegacyKeyFunction · 0.85
IsNamedKeyFunction · 0.85

Tested by

no test coverage detected