love icon indicating copy to clipboard operation
love copied to clipboard

[12.0] Having key repeats and text input on at the same time has weird behavior

Open swordcube opened this issue 2 months ago • 5 comments

If you have key repeats and text inputs enabled, isrepeat in love.keypressed will always return false, even though love.keypressed still gets repeatedly called. But if text inputs are disabled, then isrepeat will return true if the key is held down as per usual

Example main.lua file:

function love.load()
	love.keyboard.setKeyRepeat(true)
	love.keyboard.setTextInput(true) -- this causes isRepeat to always output false if enabled
end

function love.keypressed(key,_,isRepeat)
	print("key " .. key .. " is repeated? " .. tostring(isRepeat))
end

This issue occurs on the Linux x64 AppImage actions build for commit c1e097ada4990ee7facc65d9cbdc1ecb1823ad02, no clue if this happens on any earlier commits

swordcube avatar Oct 17 '25 16:10 swordcube

Which platform and love version are you testing with?

slime73 avatar Oct 17 '25 16:10 slime73

Which platform and love version are you testing with?

I was editing the message and suddenly this shows up

I am testing on Linux (Fedora), but I had a friend test on EndeavourOS (Arch) and it only happened there, as for love version i'm testing with Love 12.0 as shown in commit title

swordcube avatar Oct 17 '25 16:10 swordcube

I should've worded that slightly better, the issue doesn't happen to me at all, but happened to 2 other friends on Linux (one on EndeavourOS (Arch) and the other on pure Arch)

swordcube avatar Oct 17 '25 19:10 swordcube

Did they use the appimage as well? If love's setup and dependencies are the same on all systems including yours, then it may be a system problem for them. Otherwise it could be an issue with SDL, if they aren't using the appimage.

slime73 avatar Oct 17 '25 19:10 slime73

Did they use the appimage as well? If love's setup and dependencies are the same on all systems including yours, then it may be a system problem for them. Otherwise it could be an issue with SDL, if they aren't using the appimage.

They are both using the appimage You might be right on it being a system issue since we're all on different distros & desktop environments

swordcube avatar Oct 17 '25 19:10 swordcube