Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using ubuntu 12.04.2 LTS. Dual boot with windows 7. But my keyboard is not working properly in terminal. While typing, when I press up arrow key it is displaying "a" letter and when I press down arrow key it is displaying "b" letter. Please help me out.

share|improve this question
Check to see if a 'Ctrl' key is stuck down? – Omio Jun 24 '13 at 15:09
No... i just bought new keyboard.. it is working properly on windows! – Chinmay Joshi Jun 24 '13 at 15:21

This is normal behaviour if your arrow keys are not bound to any functionality. You can for example add these lines to ~/.inputrc to search for the string before the cursor when pressing up or down:

"\e[A": history-search-backward
"\e[B": history-search-forward

You'll need to log out and in again to make them take effect.

share|improve this answer
Where I'm suppose to put these commands? :O – Chinmay Joshi Jun 24 '13 at 15:22
~/.inputrc. It's a hidden file (hence the dot) in your home directory (hence the tilde). They are not commands, but rather configuration. – l0b0 Jun 24 '13 at 15:59
okay! How I'm suppose to work with them? – Chinmay Joshi Jun 24 '13 at 16:22

I was having the same issue this worked for me :

  1. Open Vim editor,
  2. Get the path of your home directory by typing :echo $HOME
  3. Check if you have .vimrc file in $HOME location,(if you don't have create it)
  4. Add the following line line to .vimrc file

    set nocompatible 


    set nocp
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.