Use key.isPressed() to get movement direction