Apologies for delay -- I started this earlier but was called away. Written in haste, apologies for errors:
Steve wrote: > On Mon, Aug 24, 2020 at 05:35:11PM -0400, [email protected] wrote: > > I think I have encountered the problem that led Aaron to disable the use of > > termcap in linux in 2003. Non-x ved now starts up for terminals known to > > terminfo, and I can get around using control keys, but keys that generate > > sequences of characters - e.g., arrow keys and function keys - aren't > > working. I _think_ the problem is that vedescapetable is not being > > populated correctly. My uparrow key generates the sequence esc [ A, ascii > > 27 91 65. When I have TERM set to xterm, vedescapetable(91) has a > > subsequence '65 vedcharup'. When TERM is set to rxvt-unicode or some other > > vt100 superset that doesn't have its own poplog definitions, > > vedescapetable(91) does not have the number 65 anywhere in it. > > > > I haven't yet understood how vedescapetable gets its values. The file > > vedtermcap.p looks relevant, but is not easy to follow. > > Waldek wrote: > I am affraid that this part is not implemented at all. AFAICS > vedescapetable gets some default value and this value is in > use. > > Using terminfo we should be doing something like this: > > /* Up arrow handler */ > install_escape(termcap_getstring('ku'), vedcharup) > /* Down arrow handler */ > install_escape(termcap_getstring('kd'), vedchardown) > .... > > where 'install_escape' should install appropriate entries in > vedescapetable. But I see no code like this. In fact, searching > code for string 'ku' or 'kd' gives me nothing... > > So it seems that we need to write appropriate 'install_escape' > (it needs to handle multicharacter sequences, so may be a bit > more complicated than simple assignment) and do assignments > for known keys sequences. ATM I see no code like this... Using *vague* memories, plus grep, I may have found what you were looking for. $usepop/pop/lib/ved/ved*.p includes some files with terminal names, which are hard to recognize as such. Perhaps they should have been in a separate directory for terminal-specific mappings. I think this goes back to a time when a terminal combined screen and keyboard (later linked by cable), e.g.: DEC VT100 https://en.wikipedia.org/wiki/Dell_Wyse https://en.wikipedia.org/wiki/Thin_client https://www.cbronline.com/news/sun_to_launch_first_x_terminal_as_sparclassic_x/ and others. I recall a teaching lab full of X-terminals connected to a single Sun server. There were several brands of Xterminals, but I've forgotten most of their names. At that time (if I remember correctly) a terminal defined a screen plus keyboard each of which could have some unique features. Nowadays screens and keyboards are separate items (e.g. can be purchased separately) so we need to separate settings for screen from those for keyboard. Kayboards are mostly standardised for particular lnaguages and countries (e.g. UK English keyboards differ from US English keyboards), which is very annoying when travelling! And within a language there may be differences in numbers of keys provided (e.g. laptop keyboards vs detachable computer keyboards) Anyhow, here are the settings for the Wyse terminal, to illustrate the above points: /bham/htdocs/website/research/projects/poplog/p/poplog_base/pop/lib/ved/vedwyse.p There must be others in that directory, and perhaps a default (Xterm?) layout specified somewhere else. But given that there are about 360 files there (of various types) it may take some time to find the ones that are relevant to particular types of terminal. Some of the files in that directory or other ved directories must specify mappings between generic actions and their on screen instatiations, e.g. insert line, extend line by adding text at end, or by adding text in the middle, etc.. I doubt that anyone is going to have time to devise and implement an entirely new scheme so at least in the short term the task is to find which bit of the old Ved is not yet accurately 'imported' into Waldek's new system. That should not be a big job! For each language (or language type) I suspect there are a few more or less standard types of keyboard layout and standard(?) screen control functions. (Are there any screens that display text in vertical columns? https://www.w3.org/TR/clreq/ states: 2.There are two writing modes: vertical and horizontal. The former is often seen in publications from Taiwan, Hong Kong etc. ) I don't expect anyone in the near future to produce a version of ved that combines horizontal lines for code and vertical for text. I hope that makes some sense and gives someone ideas about how best to proceed. Aaron
