Using Keyboard command controll unipolar stepper motor

Code is working but the way i want, is not like that. When i press "1" motor is not rotating continuously, it stuck after one cycle.