Esc is working fine here with your xml, I pressed RefAll, Z started moving, I pressed Esc and the Z stopped and RefAll macro exited.
If you dont get that happening then maybe it is your keyboard, could even be the layout of your keyboard if it is not a UK or USA layout.
Hood