You could add a second check in the looping event that checks to make sure you are not moving and set it false when you are moving no matter what buttons are being pressed.
You could add a second check in the looping event that checks to make sure you are not moving and set it false when you are moving no matter what buttons are being pressed.