diff --git a/cimgui/cimgui.cpp b/cimgui/cimgui.cpp index d9dcbe4..702b8dd 100644 --- a/cimgui/cimgui.cpp +++ b/cimgui/cimgui.cpp @@ -1260,6 +1260,11 @@ CIMGUI_API bool igIsRectVisible(CONST ImVec2 item_size) return ImGui::IsRectVisible(item_size); } +CIMGUI_API int igGetKeyIndex(ImGuiKey key) +{ + return ImGui::GetKeyIndex(key); +} + CIMGUI_API bool igIsKeyDown(int key_index) { return ImGui::IsKeyDown(key_index); diff --git a/cimgui/cimgui.h b/cimgui/cimgui.h index 33c01ba..52f1052 100644 --- a/cimgui/cimgui.h +++ b/cimgui/cimgui.h @@ -320,6 +320,7 @@ CIMGUI_API ImU32 igColorConvertFloat4ToU32(CONST struct ImVec4 in); CIMGUI_API void igColorConvertRGBtoHSV(float r, float g, float b, float* out_h, float* out_s, float* out_v); CIMGUI_API void igColorConvertHSVtoRGB(float h, float s, float v, float* out_r, float* out_g, float* out_b); +CIMGUI_API int igGetKeyIndex(ImGuiKey key); CIMGUI_API bool igIsKeyDown(int key_index); CIMGUI_API bool igIsKeyPressed(int key_index, bool repeat); CIMGUI_API bool igIsKeyReleased(int key_index);