it'd be really helpful if there was a way to set a move cursor string in a custom key definition.
For example, the key is defined as \leftrightarrow{%} and there is a property called set cursor, set to % which moves the cursor to % inside the brackets inside \leftrightarrow{<cursor is here>}.
abbr command of fish shell has some similar option (called --set-cursor). its good to take a look at. i'm not really good at android development, i'd make a PR otherwise.