A now-dead sibling asked about an escape key; on Android at least there are keyboards that have the meta buttons (no affiliation: https://play.google.com/store/apps/details?id=org.pocketwork... is one example).
https://wiki.termux.com/wiki/Touch_Keyboard
I found vim is actually the most convenient editor to use on Android to edit code without hardware keyboard compared to any editor that I found on f-droid. And I don't use vim on a regular computer.