when i use love.graphics.toggleFullscreen(), it deactivates keyboard.setKeyRepeat(). i WONDER why !
here is a quick test code :
Code: Select all
function love.load()
x = 0
love.keyboard.setKeyRepeat(.1, .1)
-- love.graphics.toggleFullscreen()
end
function love.draw()
love.graphics.print(x, 0, 0)
end
function love.keypressed(key)
if key == " " then x = x + 1 end
if key == "escape" then love.event.quit() end
end
hold space and number go to the sky
but if you edit the code to uncomment the fifth line, the setRepeatKey function will go back to default values