value for the arrow keyswhich is why we use the constant variable k_left you can use the ord(function to get the ordinal value of any single character to compare it with event key by executing the code on lines and if the keystroke was either k_left or ord(' ')you make the left arrow key and the key do the same thing the wasand keys are all used as alternates for changing the movement variables the wasd (pronounced "wazz-dee"keys let you use your left hand the arrow keys can be pressed with your right hand figure - the wasd keys can be programmed to do the same thing as the arrow keys handling the keyup event if event type =keyupwhen the user releases the key that they are holding downa keyup event is generated if event key =k_escapepygame quit(sys exit(if the key that the user released was the esc keythen terminate the program rememberin pygame you must call the pygame quit(function before calling the sys exit(function lines to will set movement variable to false if that direction' key was let go if event key =k_left or event key =ord(' ')moveleft false if event key =k_right or event key =ord(' ')moveright false if event key =k_up or event key =ord(' ')moveup false if event key =k_down or event key =ord(' ')movedown false teleporting the player if event key =ord(' ')post questions to