$ 0 0 Your line 8 says "if the other keys haven't been pressed"... So, if they are pressed, your jump code is skipped.