delete - backspace - break

I don't have a link. Basically only a problem when sshing (or telent, or serial) between linux and any of the older unixes and somewhat to current freebsd.

The break key is not really a terminal function, it's a tty control code, displayed and set by th stty command. It must be a single byte. It can be set to basically any value, but can only be a single byte.

On linux, both the console which is TERM=linux and most gui xterm-alikes which are mostly TERM=xterm-something, both of which are somewhat similar to vt220:

break aka stty intr is 0x03 (^C),
backspace aka stty erase is 0x7f (^?),
and the Del key emits a multi-byte sequence 0x1b5b337e (^[[3~ aka esc[3~)

On sco:

break / stty intr is ^?
backspace is ^H
the Del key emits ^?

hardly anyone will have to worry about a sco box these days but the freebsd console is almost identical to scoansi, though I don't remeber what the default stty settings are, and a freebsd box will at least have the same definition of xterm as everyone else. but "xterm" on a sco box has entirely different codes for the F-keys and I think some other stuff like colors and line-drawing, and the stty defaults are the same as for the console.

When sshing in either direction between the two systems, unless you install good terminal definitions for each terminal in the other systems termcap & terminfo, AND, add code to .profile to change stty settings based on the detected $TERM on login, you end up with super annoying things where in one direction pressing backspace blows away whatever you were doing because it's like pressing Ctrl-C, or in the other direction backspace does nothing or prints a visible "^H" or something, but pressing Del acts like backspace.

As a service provider moving users from sco hosts to linux, the users have been pressing Del for 10 to 15 years (20 years ago now), but a linux terminal emulator does not emit a single byte from it's Del key. The Del key CAN NOT be assigned to be the break key because it emits a multi-byte sequence not a single byte.

All fine for most users because they can use a terminal emulator that emulates scoansi instead of linux or xterm etc, and so for the bulk of normal users it's possible to make everything exactly the same, no change with the move to linux.

But the console can not be made to emulate the sco console without such dirty hacks that I just refuse to do it. I lie and say it's not possible.

And usually the business owner would use the console so it needs to behave the same as all the other terminals. None of these people are IT people. They don't ever actually see the bash prompt, just login directly to an application. They are like cashiers before barcodes who get real fast with muscle memory blazing through menus and screens without even looking, and so there can be no mix of different terminals with different rules and different keystrokes etc, and you can't be changing that single button Del for break that they press a zillion times an hour to some two button hot key like Ctrl-C.

No one hits any of this today because there is mostly no such thing as a regular user that logs in to a terminal at all, and those few that do access shells get the same xterm pretty much everywhere and there almost isn't any such thing as a console any more.