Test if the pause key should pause or unpause the game.
Bool Test
If the paused variable is true, send unpause event, otherwise send the pause event.