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

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

-- 
                              Waldek Hebisch

Reply via email to