I found out years later, with a similar mistake, that the problem was due to a bad configuration of my .inputrc file.
The configuration was something like that : bind '"\e[A": history-search-backward' bind '"\e[B": history-search-forward'
There are two possible situation that could have happened :
- I executed
. .inputrc and forgot the '' - This bad configuration of the
.inputrc was executed at login
For the second case not to cause an error, the syntax should have been : "\e[A": history-search-backward "\e[B": history-search-forward
The solution is to reset the key bindings with first : set -o vi to reset the binding for the 'b' and 'f' keys then set -o emacs to recover the nice EMACS bindings. Strangely I found out that set -o emacs alone would not reset the bad bindings.
xevinstalled (linux.die.net/man/1/xev). Start it and try the keys again.