Stopping macro execution

Hi,
I’ve developed a on-line monitor, writing a root macro. Is it possibile to stop the monitor execution, and returning to the root prompt, for example hitting a key?
Thanks a lot

Sara