@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.
Top-level
@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. 9 comments
@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. @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... @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.) @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. |
@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