Email or username:

Password:

Forgot your password?
Top-level
Julia Evans

@hanshuebner thanks, I just learned that Ctrl+H is sometimes backspace today

5 comments
wfk

@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...

Julia Evans

@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!

wfk replied to Julia

@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.

Julia Evans replied to wfk

@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

Eli the Bearded

@b0rk @hanshuebner
As an example, the tty level driver is operating when you are in password entering mode. The readline functions will not be there, but tty level backspace, delete word, and delete line will be.

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.)

Go Up