About key command (lua script)

1

Is there any way I can put something in the script, so that if I press a key, it responds with a command? If so, how?

    
asked by anonymous 05.02.2015 / 21:11

1 answer

1

On the platform for creating games called Love 2d you can do this.

Example:

function love.keypressed(key)
    print(string.format("você apertou a letra '%s'", key)
end

Reference: link

    
11.12.2015 / 15:45