Use num keypad for cursor movement, etc. keys. This allows to have Home key.

On some Android versions, Home key unconditionally used to go to Home screen,
so using numpad in cursor key mode is the way to actually have a usable Home
key still. Then, standalone Home key can be redefined to produce numpad's
key code too to get around ugly Android behavior. For reference:

/system/usr/keylayout/bk/Generic.kl:
-key 102   MOVE_HOME
+key 102   NUMPAD_7
Add "xterm" terminal type.
If TERM=xterm, use corresponding codes for Home/End keys.
Use xterm settings as after-install defaults.