The thing with TUIs is that, using mobile native virtual keyboards, it's apparently quite impossible to make them behave in a sane way in browsers!
I think the only reasonable option seems to be reimplementing one yourself, which is massively stupid.
Mobile is not for TUI
More specifically it's an interface designed for a physical keyboard. Or even more specifically it's designed for precise and easy human text input.
especially where you typically type with all fingers instead of just your thumbs
Sure it is. I, and millions of others, use it all the time with for example Termux.
If you have a TUI the correct way to support mobile browsers is to 1-shot a React page equivalent. Trying to make the mobile keyboard work for this would be silly.