How do I check text entry only if enter pressed (Solved)

I can enter a phrase in the text input space and if it starts with something and ends with something, then the result is triggered. In this case, a box is either smashed or examined.


But if I make enter be a condition for all this (as I have done in the screenshot) nothing happens. The box is not destroyed. A tombstone (loot) is not dropped in its place. How is the best way to ensure the input doesn’t register until the player tells it to, while still allowing the input to function if submitted? Would a button work for this?

Experiment: Success. It works.