> When I print out (to the TeraTerm telnet screen) the 'infocmp' data, I see
> (somewhere in the middle) something like this -
>        kf1=\EOP, kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt,
>         kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw
> But when I 'cat -v' and hit a function key, I see - ^[[11~ (for the F1
key).
>
> How does this relate?  And if something is wrong, how do I determine what
(and
> how) to fix it?  Keith

Ok, this is the problem. The terminfo for your terminal says F1 is [esc]OP,
and your terminal is sending [ESC][11~

There are 3 ways to fix it: One is configuring your telnet in order to send
[esc]OP for F1, etc. Other is searching for a terminfo name that match your
terminal. And the other is creating a terminfo entry for your terminal.

1) Many telnet applications lets you to redefine the keyboard and you can do
this, but sometimes there may be other differences than keybord escape
sequences.

2) There may be a terminal definition that match your terminal. You can
search the names at /usr/share/terminfo/?/* and you can type "export
TERM=xxxxx" at the shell prompt in order to change the term definition and
test it with mc or dosemu if you want. If you find the right name, many
telnet clients have a place to type the name that they will report to the
telnet server and that will be assigned automatically to TERM environment
variable.

3) If you cannot find a terminal definition that match exactly that you are
using, you can create a new one or modify the existing one that you are
using (backup it before).

To do this use infocmp > afile to dump the information to a file. Then edit
the "afile" file and recompile it with tic afile. Note that there is not
matter with the name of this file. The terminfo definition name is inside
the file. Read the man of terminfo to learn the meaning of the variables.
You may need to edit other data also, like auto margin, etc. This work may
take a few days.

For some applications that uses termcap and not terminfo data you can
convert the terminfo file (afile in this case) to termcap format using
captoinfo and adding (or replacing the block) the result to /etc/termcap.

Reply via email to