尝试将更改代码放入love.keyreleased()
像这样的东西main.lua
local changeMenu =false
function love.draw()
if changeMenu then
-- do what you need to do
changeMenu = false
end
end
function love.keyreleased(key)
if key=="return" or key=="kpenter" then
changeMenu = true
end
end