Tried to improve control delays

Made it so that if a key is pressed and held, the action is carried out
once, then there is a long delay, then it is carried out repeatedly
with a short delay between each. Also made it so that if a key is
released, then the delay will be short if a key is pressed soon.