|
|
@ -113,10 +113,13 @@ void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int key, int scancode, int a
|
|
|
|
g_PrevUserCallbackKey(window, key, scancode, action, mods);
|
|
|
|
g_PrevUserCallbackKey(window, key, scancode, action, mods);
|
|
|
|
|
|
|
|
|
|
|
|
ImGuiIO& io = ImGui::GetIO();
|
|
|
|
ImGuiIO& io = ImGui::GetIO();
|
|
|
|
if (action == GLFW_PRESS)
|
|
|
|
if (key >= 0 && key < IM_ARRAYSIZE(io.KeysDown))
|
|
|
|
io.KeysDown[key] = true;
|
|
|
|
{
|
|
|
|
if (action == GLFW_RELEASE)
|
|
|
|
if (action == GLFW_PRESS)
|
|
|
|
io.KeysDown[key] = false;
|
|
|
|
io.KeysDown[key] = true;
|
|
|
|
|
|
|
|
if (action == GLFW_RELEASE)
|
|
|
|
|
|
|
|
io.KeysDown[key] = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Modifiers are not reliable across systems
|
|
|
|
// Modifiers are not reliable across systems
|
|
|
|
io.KeyCtrl = io.KeysDown[GLFW_KEY_LEFT_CONTROL] || io.KeysDown[GLFW_KEY_RIGHT_CONTROL];
|
|
|
|
io.KeyCtrl = io.KeysDown[GLFW_KEY_LEFT_CONTROL] || io.KeysDown[GLFW_KEY_RIGHT_CONTROL];
|
|
|
|