Re: "F" keys on PC
Posted in 1994
sheltra@emh-1.submepp.navy.mil writes: > > Hello INFORMIX users. > > I am new to the INFORMIX world and asking for some help. I > am using an AST pc. This is connected to a server > (Intergraph) which is where the database and INFORMIX > software is located. I have my terminal identified as a > VT100, which I'm told it should be. I have my environment > variables set for TERMCAP. My problem is the my "F1-F12" > keys do not respond to my 4GL code. What's wrong? I'm using > 4.1 4Gl and SQL. > Thanks in advance for any help. > Reggie > > My e-mail sheltra@emh-1.submepp.navy.mil If your function keys are sending out unique signals in vt100 mode, you can edit the $TERMCAP file to understand these signals as function keys. The easiest ways to determine if the F keys are sending out anything is to get into vi on a new file, get into edit mode (type a), arrange to ignore special characters (type CONTROL-V), then type the function key in question. You should see something like: ^A@ That was F1 from a wyse-50 terminal, and it tells me that F1 is sending out control-A @ control-M (I know the control-M because that's a RETURN signal and the cursor jumped down to the next line). For vt100, the line will probably be something like: ^[A, the "^[" indicating an ESCAPE signal. Type ESCAPE to get out of vi edit mode, open up a new line (CONTROL-O) and try again with F2. If the function keys are NOT sending out any signal, then you need to figure out a way to get them to, like another poster suggested. An appendix in the 4GL manuals (sorry, I don't have my book here right now) explains how the modifty $TERMCAP for function keys. Bascially, you edit the $TERMCAP file with the signals you want, so in my $TERMCAP for wyse50, I have a string that shows: k0=^A@^M (k0 stands for F1. You can define up to 36 unique Function key signals: k0-k9 is F1-F10, kA-kZ is F11-F36. So, I can define shift-F1 as F13 so in $TERMCAP I have kC=whatever shift-F1 sends out, and in the 4GL code I can have an ON KEY F13 control block.) If you have keys like PageUp, PageDown, Home, End, Insert, and Delete, and they send out distinct signals, you can modify $TERMCAP to assign these signals as function keys as well, then do things like OPTIONS NEXT KEY F30 (where $TERMCAP has F30 (kT) set to whatever signal the Page Down key is). It's only confusing at the start. Do a full set for a terminal and you'll feel like an expert! ================ Dennis J. Pimple Informix CSE / Denver 303-850-0210