I know that if I want to make xterm erase a character when I press backspace, I do: stty erase ^? but I also want xterm to erase a character when I press shift+backspace, and I can't find an explanation for how to do this.
With a little C program using ncurses, I have determined that when I press shift+backspace, it translates to the following sequence of bytes:
27 91 51 59 50 126
When I press ctrl-v and then shift+backspace, it shows up in xterm as:
^[[3;2~ (where ^[ is, of course, the escape character, ASCII byte 27).
I have tried doing stty erase followed by ctrl-v, shift+backspace but I get the following result:
~ > stty erase ^[[3;2~ stty: invalid integer argument `\033[3' Try `stty --help' for more information. 2~: Command not found. Is there a way to do this? Or is it impossible because shift+backspace is not a single byte but 6?
xterm -xrm '*VT100*translations: #override Shift <Key>BackSpace:string(\1 77)', and if it works, make that xrm argument loaded by xrdb in each session (usually by adding it to~/.Xresources, though that's not guaranteed to work on all desktops)sttycan only "bind" single bytes, not escapes like^[[3;2~, and cannot bind multiple bytes to the same action.xterm -xrm ...command, but it doesn't perform a backspace when I do shift+backspace. However, it also doesn't echo2~, which was the current behavior; it just nothing. Any idea what might be going on?\1and the77of\177(same as 0x7f^?). Corrected command:xterm -xrm '*VT100*translations: #override Shift <Key>BackSpace:string(\177)'