On Tue, Aug 25, 2020 at 09:56:19AM -0400, [email protected] wrote:
> On Tue, 25 Aug 2020, hebisch-at-math.uni.wroc.pl |pop-forum| wrote:
> ...
> > > 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?
> >
> > vedsetkey looks close. IIUC difference is that strings that we
> > get from terminfo do not contain initial escape. For example:
> >
> > termcap_getstring('ku') =>
> > ** A
>
> I think that is just because of the way that pop11 prints. I get that too,
> but (with TERM=rxvt-unicode)
>
> : termcap_getstring('ku')->s;
> : length(s)=>
> ** 3
> : s(1)=>
> ** 27
> : s(2)=>
> ** 79
> : s(3)=>
> ** 65
Right. With TERM=xterm I get:
: vars s = termcap_getstring('ku');
: s =>
** A
: explode(s) =>
** 27 79 65
With TERM=rxvt-unicode I get:
: explode(s) =>
** 27 91 65
So there seem to be some variation between machines. One reason
can be due to terminal init string. Init string can redefine
effects of some keystrokes. Different versions of terminfo
can use different init strings (and correspondingly different
key codes).
--
Waldek Hebisch