Use the arrow Keys.
I have had a hard time finding a platformer that doesn't have glitches in the physics. This one seems to work fine. Actually, it only partially works, but you can add the rest of the code to make it work fine.