Valery Ushakov <uwe%stderr.spb.ru@localhost> writes: > vt52 is different. I never used a real vt52 or a clone, but the > manual at vt100.net gives the following picture: > > https://vt100.net/docs/vt52-mm/figure3-1.html > > and the description > > https://vt100.net/docs/vt52-mm/chapter3.html#S3.1.2.3 > > Key Code Action Taken if Codes Are Echoed > BACK SPACE 010 Backspace (Cursor Left) function > DELETE 177 Nothing That is explaining what the terminal does when those codes are sent by the computer. That is a different thing from how the computer interprets user input. When using a VT52 on Seventh Edition, for example one pushed DEL to remove the previous character, and the computer woudl send "<BS><space><BS>" to make it disappear and leave the cursor left. One basically never pushed BS. > vt100 had similar keyboard (again, never used a real one personally) > > https://vt100.net/docs/vt100-ug/chapter3.html#F3-2 > > BACKSPACE 010 Backspace function > DELETE 177 Ignored by the VT100 same as vt52, I think. > But vt200 and later use a different keyboard, lk201 (and i did use a > real vt220 a lot) > > https://vt100.net/docs/vt220-rm/figure3-1.html > > that picture is not very good, the one from the vt320 manual is better > > https://vt100.net/docs/vt320-uu/chapter3.html > > vt220 does NOT have a configuration option that selects the code that > the <X] key at the upper right corner sends. It's always ^? (\177). So that is the "DEL" key, not the BS key. It's what you push to make DEC-family operating sytems remove a character from input, and it isn't and output carriage-control code. > But somehow the official terminfo database has kbs=^H for vt220! > > Later it became configurable: > > https://vt100.net/docs/vt320-uu/chapter4.html#S4.13 > > For vt320 (where it *is* configurable) terminfo has > > $ infocmp -1 vt320 | grep kbs > kbs=^?, Very interesting! > >> I think the first thing to answer is "what is kbs in terminfo supposed >> to mean". > > X/Open Curses, Issue 7 doesn't explain, other than saying "backspace" > key, which is an unfortunate name, as it's loaded. But it's > sufficiently clear from the context that it's the key that deletes > backwards, i.e. <X] or <-, as opposed to "delete" key (kdch1) that > deletes under. So it's the codes generated by the DEL key (as opposed to the Delete key). >> My other question is how kbs is used from terminfo. Is it about >> generating output sequences to move the active cursor one left? If so, >> it's right. Is it about "what should the user type to delete left", >> then for a vt52/vt220, that's wrong. If it is supposed to be both, >> that's an architectural bug as those aren't the same thing. > > No, k* capabilities are sequences generated by the terminal when some > key is pressed. The capability for the sequence sent to the the > terminal to move the cursor left one position is cub1 > > $ infocmp -1 vt220 | grep cub1 > cub1=^H, > kcub1=\E[D, > > (kcub1 is the sequence generated by the left arrow _k_ey). Then I'm convinced that kbs should be \? for these terminals.
Attachment:
signature.asc
Description: PGP signature