Ok. I think I know what happened.
love.js hides the mouse cursor, but it doesn't capture keyboard input until you click at the game window, even if you switch to fullscreen.