Quote:
Originally Posted by default5
Are you saying that I would have to determine what the escape characters mean, and try to emulate that in an ncurses window?
|
That would probably be your best bet.
Quote:
Originally Posted by default5
Could I leverage terminfo to get the meanings of the escape sequences?
|
Yes. Do this:
That will tell you the meaning of all entries in a terminfo data file. But there are many such files, depending on your terminal type. To find out which one you'd be using, do this:
This environment variable shows which terminal type is used in the terminfo entries.
In a simpler world, if the terminal type is
vt100, for example, you'd want to look at the file at
Code:
/usr/share/terminfo/v/vt100
But this world is not that simple; that file is already in its compiled form.
I'm running Slackware 12.1, so for me to find all the data in its source form (before
tic compiles it), I go
here to pick up the source. Within that tarball, the file of interest is
misc/terminfo.src.
But the data should be the same regardless of your distribution. I wanted to just slap it all in here for your convenience, but this site doesn't allow source that large. Even if you don't use Slackware, the file in that tarball will be what you want. So download it, find your terminal type (from the
TERM environment variable), review the terminfo man page, and knock yourself out.
Hope this helps.