love.js icon indicating copy to clipboard operation
love.js copied to clipboard

Using preventDefault on a keyCode prevents that key from triggering love.textinput

Open Sheepolution opened this issue 4 years ago • 2 comments

Using preventDefault on a keyCode prevents that key from triggering love.textinput. I learned this when I wasn't able to type any spaces in my game.

There is a very simple fix for this: Don't use preventDefault. I commented that part out and now it works, and I have had no issue with the page moving down, as long as the game has focus. So it might be unnecessary.

Sheepolution avatar Oct 26 '20 12:10 Sheepolution

I'll test this out on some browsers and then remove preventDefault if there is no effect.

Davidobot avatar Oct 26 '20 13:10 Davidobot

I'll test this out on some browsers and then remove preventDefault if there is no effect.

This is still a problem now. We have a in-game console and need space for commands

ParticleG avatar Jun 14 '23 14:06 ParticleG