This sets the values of four booleans named for the four directions depending on whether a specified key is pressed down.