Use arrow keys or wasd to move.
This is based of a previous platforming engine I made, but it uses recursion instead of 100 "if" blocks. It's not perfect yet, but it is a step up from the previous engine. Credit to trueGamerz for cleaning up a bit of the code, and reducing some of the lag.