Skip to content

Commit

Permalink
Use io.AddKeyEvent() in imgui_SetKeyDown() so that non-text keys work
Browse files Browse the repository at this point in the history
  • Loading branch information
dri-richard committed Jun 5, 2024
1 parent 78699ac commit 7d4fd92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imgui/src/extension_imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ static int imgui_SetKeyDown(lua_State* L)
DM_LUA_STACK_CHECK(L, 0);
ImGuiIO& io = ImGui::GetIO();
uint32_t key = luaL_checknumber(L, 1);
io.KeysDown[key] = lua_toboolean(L, 2);
io.AddKeyEvent((ImGuiKey)key, lua_toboolean(L, 2));
return 0;
}

Expand Down

0 comments on commit 7d4fd92

Please sign in to comment.