This question already has an answer here:
I am using Ubuntu 16.04 LTS. I have a file I open in the terminal with
vi abc.txt, and to edit/insert some text into it I press the insert button.
When I press the arrow keys ↑/→/↓/← it inserts the letters A/C/B/D respectively instead of moving the cursor. Even if I type backspace ⌫ to delete the inserted letter it doesn't get deleted.
Why is this happening? Why are these letter added instead and why are they not getting deleted when I press backspace?