Page 2 of 2

Re: In inputrc, making backward-word and forward-word work

Posted: 16. Jan 2014, 01:05
by marin
The read shell command helps. Enter it and start pressing your key combinations.
Notice how output differs from X terminals to TTY.

Than you can litteraly quote the result into /etc/inputrc, for example, in TTY you need:

Code: Select all

"\e[d": backward-word     # ctrl + left
"\e[c": forward-word      # ctrl + right
# or
"^[[d": backward-word     # ctrl + left
"^[[c": forward-word      # ctrl + right
because:
"\e" == "^["

You have to enter combination for both TTY and X terminal (rxvt, xterm, Terminal, terminator, tilda etc) to have uniform response.