We'll have to change a couple of things in order to start using the keyboard:
processInputmethod and the call to on
function Game:keyPressed ( key, down ) if key == 'right' then Character:moveRight(down)end if key == 'left' then Character:moveLeft(down)end if key == 'up' then Character:jump(down)end end
This method maps some key presses with the methods we created on
Character. This should be enough to handle the movement of our character.
input_manager.luaand rewrite it using the following code: