Sponsored Content
Top Forums UNIX for Advanced & Expert Users F3 to F10 not working with TERM=ansi ? Post 302109357 by sb008 on Monday 5th of March 2007 04:13:57 PM
Old 03-05-2007
y
Quote:
Originally Posted by sabu
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'?
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:

Code:
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:

Code:
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:

Code:
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

Last edited by sb008; 03-05-2007 at 05:23 PM..
 

9 More Discussions You Might Find Interesting

1. Programming

Ansi C

Dear All, I have to develope some C functions in Unix for a Magic program. The original MSE code which compiles the attached C program uses a +z option, but the cc compiler don't know this. The complete command in the compiler script is 'cc -c -Aa +z myfile.c'. The warning message is 'The -z... (4 Replies)
Discussion started by: Frankie
4 Replies

2. Programming

ANSI C vs POSIX

can somebody explain about the ANSI C vs POSIX. say i was using open and fopen, i know that open is POSIX, and fopen is ANSI C. i read that that POSIX is a system call and ANSI C is like a standard library function. wouldn't the fopen function has to call on open function anyway to open any kind... (2 Replies)
Discussion started by: bb00y
2 Replies

3. Programming

Create a Term & Run chars on this Term

hi floks ! i'd like to know how can i transmete a character or a string from my source code to a term and make it interpret or un by the shell wich is running in my term. I'd like to create a Term from my code (and get its file descriptor) and then transmete each char typed on the keyboard to... (1 Reply)
Discussion started by: the_tical
1 Replies

4. Programming

hint on ansi c

I am a student. And need help on following program. I want to make a c program. I have to scan a sentence and I have to interchange a word from that sentence. Example: Scan the sentence is " Drilling machine and Milling machine " . Replace the word "machine" by "operation". And output should... (2 Replies)
Discussion started by: dhaval chevli
2 Replies

5. Shell Programming and Scripting

Search term and output term in desired field

Hi All, I have an input_file below and i would like to use Perl to search for the term "aaa" and output the 3rd term in the same row as "aaa".For Example, i want to search for the term "ddd" and would want the code to ouput the 3rd term in the same row which is "fff". Can somebody help ? ... (28 Replies)
Discussion started by: Raynon
28 Replies

6. Shell Programming and Scripting

Convert file from Unix - ANSI to PC - ANSI

Hi, I am creating a file in Unix using a shell script. The file is getting created in the Unix - ANSI format. My requirement is to convert it to the PC - ANSI format. Can anyone tell me how to do this? Thanks, Sunil (0 Replies)
Discussion started by: ssmallya
0 Replies

7. HP-UX

Unix_ANSI to PC-ANSI

I want to convert a file from Unix-ANSI to PC-ANSI format. How can i achieve that? (0 Replies)
Discussion started by: ssmallya
0 Replies

8. HP-UX

HP-UX ansi c precompiler

Hi, How can i find which ansi c precompiler are installed on my hp-ux b11.23 itanuim machine ? Thanks (3 Replies)
Discussion started by: yoavbe
3 Replies

9. Programming

why the implementatoin of Bakery algorithm in ANSI C does not work in ANSI C

I follow the description of wiki (Lamport's bakery algorithm - Wikipedia, the free encyclopedia), then implement that algorithm in C, but it doesn't work, Starving is still here, is the implementation worry? Only print out: Thread ID: 0 START! Thread ID: 0 END! Thread ID: 0 START!... (2 Replies)
Discussion started by: sehang
2 Replies
All times are GMT -4. The time now is 10:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy