F3 to F10 not working with TERM=ansi ?

Hello friends,

   I am using SCO Openserver 5.0.7. At the server console, the function keys F3-F10 do not work with my Sybase 4.2 application when I set the TERM environment variable to 'ansi'. What changes should I do to the terminfo source of 'ansi' to enable the function keys?
   An early response would be highly appreciated.

Regards

Sabu.

You shouldn't do anything to the terminfo source for an ansi terminal.

You should make sure your TERM environment variable is set to the proper value. A value which matches with the capabilities of your terminal.

If you really want to change the info for an ansi terminal you can use either "untic" or "infocmp" (depending on the type of Unix you are running) to get the current information for an ansi terminal.

This info you redirect to a file.

You add the necessary information to this file.

With "tic" you can store the new definition in the terminfo database.

See the "terminfo" manual page for which capabilities can be defined.
For function keys they are kf0, kf1, kf2, ............

To know the values to define for this keys one has to know the terminal type you are actually using.

Thanks for the response. I have another TERM setting, 'gist', that works fine with the function keys but the graphic characters do not display correctly. The display in the 'ansi' mode is correct but the function keys F3-F10 do not work. Can I copy the function key settings in 'gist' into the 'ansi' source and recompile with 'tic'?

my os is SCO 5.0.6
and my TERM=scoansi and it work proper.
and you can also copy some of gist line in ansi , or ansi line in gist or
you can use vt100 term type.
pankaj

y

It is better to leave the ansi definition as it is and create your own terminal definition

"infocmp ansi"

will produce output which looks like something like this:

ansi|generic ansi standard terminal,
        am, xon,
        cols#80, lines#24,
        bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z,
        clear=\E[H\E[J, cr=\r, cub=\E[%p1%dD, cub1=\b,
        cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
        dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K,
        home=\E[H, hpa=\E[%p1%{1}%+%dG, ht=\t, hts=\EH,
        ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L,
        ind=\n, invis=\E[8m, kbs=\b, kcub1=\E[D, kcud1=\E[B,
        kcuf1=\E[C, kcuu1=\E[A, khome=\E[H,
        rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m, rmso=\E[m,
        rmul=\E[m,
        sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m,
        sgr0=\E[0m, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
        vpa=\E[%p1%{1}%+%dd,

Copy this into a file and change the first line
E.g.

myansi|my ansi terminal,

and the function key definitions
kf0=...., kf1=......, kf2=.......

and you get something like this:

myansi|my ansi terminal,
        am, xon,
        cols#80, lines#24,
        bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z,
        clear=\E[H\E[J, cr=\r, cub=\E[%p1%dD, cub1=\b,
        cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
        dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K,
        home=\E[H, hpa=\E[%p1%{1}%+%dG, ht=\t, hts=\EH,
        ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L,
        ind=\n, invis=\E[8m, kbs=\b, kcub1=\E[D, kcud1=\E[B,
        kcuf1=\E[C, kcuu1=\E[A, khome=\E[H,
        rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m, rmso=\E[m,
        rmul=\E[m,
        sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m,
        sgr0=\E[0m, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
        vpa=\E[%p1%{1}%+%dd,
        kf0=...., kf1=......, kf2=.......

so:

infocmp ansi > file          (or untic ansi > file)
vi file                            (make changes as mentioned above)
tic file

to get the pf1, pf2, pf3, definitions:

infocmp gist > file2 (or untic gist > file2)

After that you set your TERM variable to "myansi"

This might work if none of they keys conflict. Always hard to define a terminal by its capabalities.

Before you try all of this you might wanna try TERM=vt220

Thanks SB008 & Pankaj Braval for your valuable suggestions. I'll try it out and let you know.

Regards

Sabu