Program "keycode" gives the codes of pressed keys and generates a corresponding termcap file. To compile : * change file name KEYCODE.4GL from uppercase to lowercase : mv KEYCODE.4GL keycode.4gl or NAMELOWER KEYCODE.4GL * compilation : fgl2p -o keycode.42r keycode.4gl To use : IMPORTANT: this program is to be used only in ASCII mode ( with FGLGUI=0 ). The main menu contains two commands : * "Key" : Gives the definition of the pressed key as returned by function fgl_getkey if it exists else gives the sequence of the key. Pressing the key "tabulation" two times exits this command. * "Termcap" : Creates a termcap file with chooosen key definitions or all keys used by INFORMIX. The generated file is called "keys.tcap" and is create in the current directory. There are two menu points for this : * "All Keys" : It asks to press all keys normaly used by a 4gl program and two times the "tabulation" key to validate the last pressed key. ex: If the word "left" appears, then the program waits for left arrow key to be pressed and validated by two "tabulation" keys. If left arrow key is defined, then it will generate in the file "keys.tcap" : kl=: else it gives the sequence ( in most cases beginning withe the escape sequence in this case "\E" ) : kl=\E[[D: Pressing two times the letter "q" exits this menu point. To retry the last key (for example, if the bad key was pressed) press two times key "=". * "Named variable" : It asks first for the name of the termcap variable and then waits for the wanted key to be pressed and validated by pressing two times the key "tabulation". The key "Return" is to exit this menu point. The result is the same as the menu point "All Keys".