if you're using UBPorts, then in the terminal app, in the bottom left corner there's a little menu button. there should be five options. nano, some others and I think Scr. nano will have shortcuts for nano like ctrl+X to exit, ctrl+O to save, etc. Scr will have terminal keys such as esc, tab, and the arrow keys.
personally I hate this method. I much prefer the keyboard in ArchARM that contains all of the keys I need. if Esc is inaccessible, then ctrl+[ works as an alternative in Vim. in UBPorts this isn't even an option. it's a shame because on mobile vim's bindings are much more efficient than the standard ctrl+ or alt+ bindings, or endless menus with functions hidden inside them.
personally I hate this method. I much prefer the keyboard in ArchARM that contains all of the keys I need. if Esc is inaccessible, then ctrl+[ works as an alternative in Vim. in UBPorts this isn't even an option. it's a shame because on mobile vim's bindings are much more efficient than the standard ctrl+ or alt+ bindings, or endless menus with functions hidden inside them.