Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 Jun 24 '13 at 15:21
add comment

2 Answers

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 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 Jun 24 '13 at 16:22
add comment

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 
    

    or

    set nocp
    
share|improve this answer
add comment

Your Answer

 
discard

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.