uix:TextInput move checking for command modes out of `insert_text` close...

...s #2350