If you are using Vi text editor in Ubuntu and found that entering arrow key (up, down, left and right) resulting the letter A, B, C and D. That's because by default, Ubuntu install "vim.tiny" instead of the full version "vim".
To solve it, it's easy, just install the full version "vim"
sudo apt-get install vim[via: http://ubuntuforums.org/archive/index.php/t-291853.html]