This is for a character to move, obviously. Whenever the character is moving left or right, and I press jump, he stops moving and only jumps, then I have to press the key down again. How would I solve this?
The idea is to have a boolean for each kind of key you need to manage. When a key is pressed, set its boolean to true. When it is released, set it to false. Check the state of the booleans to know what to do. Use the functions, not the variables in draw().