Email or username:

Password:

Forgot your password?
Top-level
Julia Evans

@hanshuebner hmm it feels a lot more fixed to me than that, like I know there are a lot of unixes out there but personally as someone who has only ever used Mac and Linux machines and would absolutely never change my `stty` settings in a million years, for me there are a lot of assumptions it's very fair to make about how these things are going to work

like it's hard to imagine that very many people are going to remap SIGINT to something other than Ctrl-C even if theoretically you can

10 comments
Hans Hübner

@b0rk I don't disagree. I guess for most people, the fact that a terminal driver exists and can be misconfigured is just a historical nuisance and not something that they can or need to take advantage of.

Julia Evans

@hanshuebner for me it's useful to know about the terminal driver because it means that when I’m using some terrible program without line editing support (which happens more often than I'd like!) I know that the terminal driver will still let me do `Ctrl-W` or `Ctrl-U` when I make a mistake

Hans Hübner

@b0rk Absolutely! This is why I think that tty driver functionality and user-mode line editing behavior deserve separate treatment. I think it is still useful to know that the driver exists and when it is active. Also, it is worth knowing that BSD derived systems have the status character (Ctrl-T) and that incorrect setting of the erase character can bite you.

Julia Evans

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

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

Raven667

@hanshuebner talking about software maintenance, the context around it changes which changes what design and abstraction makes sense. Given today's terminal context, maybe one could design a new tty layer that is much simpler by making more assumptions about the capabilities of the terminals and apps.

Go Up