MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / GetKeyData

Method GetKeyData

extern/imgui/imgui.cpp:8549–8569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8547}
8548
8549ImGuiKeyData* ImGui::GetKeyData(ImGuiKey key)
8550{
8551 ImGuiContext& g = *GImGui;
8552
8553 // Special storage location for mods
8554 if (key & ImGuiMod_Mask_)
8555 key = ConvertSingleModFlagToKey(key);
8556
8557 int index;
8558#ifndef IMGUI_DISABLE_OBSOLETE_KEYIO
8559 IM_ASSERT(key >= ImGuiKey_LegacyNativeKey_BEGIN && key < ImGuiKey_NamedKey_END);
8560 if (IsLegacyKey(key))
8561 index = (g.IO.KeyMap[key] != -1) ? g.IO.KeyMap[key] : key; // Remap native->imgui or imgui->native
8562 else
8563 index = key;
8564#else
8565 IM_ASSERT(IsNamedKey(key) && "Support for user key indices was dropped in favor of ImGuiKey. Please update backend & user code.");
8566 index = key - ImGuiKey_NamedKey_BEGIN;
8567#endif
8568 return &g.IO.KeysData[index];
8569}
8570
8571#ifndef IMGUI_DISABLE_OBSOLETE_KEYIO
8572ImGuiKey ImGui::GetKeyIndex(ImGuiKey key)

Callers

nothing calls this directly

Calls 3

IsLegacyKeyFunction · 0.85
IsNamedKeyFunction · 0.85

Tested by

no test coverage detected