Manual stepper: How to stop/interrupt ongoing/future motion?

Could the endstop pin be a virtual pin?