@hanshuebner thanks, I just learned that Ctrl+H is sometimes backspace today
5 comments
@wfk on my machine ctrl-H is not backspace, would be curious to see the output of stty -a on your machine to see how it works there! @b0rk we may be using different definitions of backspace here. I suspect you are talking about what is named the ERASE function in termios: undo the previously typed character on the line. I use backspace in the ASCII meaning, which is the ASCII code associated with ctrl-H. If your keyboard does not generate that ASCII code when you press ctrl-H, that's a seriously non-standard setup. This is a function of the terminal (emulator), not of the tty driver. @wfk yea I guess what I'm trying to figure out is whether 0x08 has much of a real purpose today or whether it's mostly cruft @b0rk @hanshuebner And people who want to can reset tty or readline config, but they are controlled in different ways. (I disable emacs style editing everywhere I can use vi style.) |
@b0rk in a literal sense, ctrl-H *is* backspace. The ERASE function in termios has historically been set to either DEL or BACKSPACE, depending on the keyboard layout and configuration of the terminal being used. This is why many terminal emulators still have a configuration setting to indicate what the Backspace/DEL/<- key on your keyboard should generate. Whether user space code honours the termios setting when running in raw mode depends on the user space code...