Use the M() token to accomplish this. You can specify the number of times to repeat before continuing to the next token if the caller makes no key press. This prevents the infinite loop issue too.