You pick up on a good question, this is currently something being ironed out in the textBox component. For me so far I have added a keyboard component to the routine that force ends the routine, but that means that in the keylist of this component you need to make sure to list keys that the participant would not use whilst typing (this is tricky because they could even use the arrow keys to move the cursor in the text box). A better solution suggested by one of the team today was to use a mouse component to end the routine, and allow “any click” to force end the routine.
The trade off is that participants might be slower to register a response after typing with a mouse click compared with a keyboard keypress - so it depends if response time is important for your study.
Hope this helps,