I've been toying with this since I put 4.4 on my laptop. I like to use xterm and bash; with this combination I cannot get <BS> to delete the previous character and <DEL> to delete the current one, the behaviour in most apps nowadays. Here's some information, hopefully somebody can help:
- Typing <CTRL>-V <BS> and <CTRL>-V <DEL> both yield "^?" so bash sees them as the same key.
- xev shows they are distinct, namely (keycode 22 / BackSpace) and (keycode 107 / Delete).
- The readline binding of \C-? is backward-delete-char. In my .inputrc I have these definitions:
In some vain attempt to get <DEL> to do delete-char but to no avail. After doing bind -f .inputrc (even though it is definitely loaded when bash starts), bind -p | grep delete shows that \C-? is still bound to backward-delete-char.
"^?" : delete-char
"\C-h" : delete-char
"\C-?" : delete-char
- I can do bind '^?=delete-char-forward' in ksh, after which both <DEL> and <BS> delete the current char, but this is still a problem since I want them to be different. Probably related to the first point above.