You have several options:
1. You can capture the text when it is entered, character after character. Then when the entered text reaches a certain size, or a certain character is pressed (i.e. "Enter"), you respond.
See
this article[
^].
2. You can add a button next to the text box, which is pressed by the user when the input is completed.