On Tue, 25 Aug 2020, hebisch-at-math.uni.wroc.pl |pop-forum| wrote:
...
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...
Thanks, Waldek. I'm reassured that it is not just me not knowing where to look.
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...
Isn't the code for vedsetkey in $usepop/pop/ved/src/vdsetkey.p doing the job of your install_escape? If I run non-x ved with TERM set to rxvt-unicode and do :vedsetkey('\^[OA',vedcharup) on the command line, the uparrow key starts behaving correctly. So might we just need a list of ved functions and their corresponding terminfo names?
Steve
