I bound some keys by mistake, and they don't work any more, such as HOME, END, UP, DOWN, LEFT, RIGHT.
Is there a way to reset all the bound keys to their original state?
If it's bash that you misconfigured, you might have done so either in ~/inputrc or in ~/.bashrc. ~/.inputrc is the configuration file for the readline library, which is used by bash and a few other command-line programs to read input. ~/.bashrc is the configuration file of bash itself.
If you start a shell with bash --norc, your ~/.bashrc isn't read, but your ~/.inputrc is. If you start a shell with HOME=/none bash, neither file is read, nor your previous shell history.
You can reset bash key bindings to their original state:
set -o emacs
This sets all key bindings to the default (which is emacs key bindings).
Alternatively, if you prefer, you can do:
set -o vi
You can also use bind -r <keycode> to remove a single key binding.
More details can be found in the bash man page under "SHELL BUILTIN COMMANDS", then look for "set" and also "bind".
Try xmodmap; the following command will show you the current key bindings:
xmodmap -pke
xmodmap has a vastly different function than the one being referred to in the question.
Commented
Sep 21, 2011 at 0:51
.inputrc.