termcap str + params -> control seq. How?
Dick Heijne CCS/TS
dick at ahds.UUCP
Wed Apr 10 03:22:10 AEST 1991
In article <7068 at auspex.auspex.com>, guy at auspex.auspex.com (Guy Harris) writes:
> ("terminfo", of course, already has an equivalent capability, namely
> "cuf".)
You're absolutely right, but what if neither package covers your needs? The
reason I decided to stick to termcap rather than terminfo was, that I had
to write an alternative to curses, since the applications run on many
different terminals, and also terminals with a specific emulation (i.e.
vt220 or wyse50) from many different manufacturers, so all with different
labels on the keyboard and sometimes with totally different keyboards.
So, I added not only new entries but also new capabilities, by introducing
a new type, i.e. the '%|' type. An example of such an entry is:
:NX=\E[6~%|Next Scrn:
which means that the logical "Next Screen" function is performed by the
key that sends the \E[6~ sequence, and is labeled with the text Next Scrn.
On the product of another manufacturer the text can be different or the
sent sequence or both. The program, however only looks for the NX entry
in order to perform its LOGICAL Next Screen function.
This also worked out to be very useful in generating Help screens, which
all show now the logical function of the specific application, next to
the label of the button on the keyboard. And that is what they should display.
This way, we ended up to remain totally independend of the creative minds
of the various terminal manufacturers.
As you notice I created lots of logical functions next to the physical ones
in termcap. This ended out much more practical in programming applications.
You can think of it what you like, but my programmers AND end-users like
the results of it very much.
All of this is absolutely impossible in terminfo.
I hope I made myself a bit more clear.
Regards,
Dick.
More information about the Comp.unix.programmer
mailing list