F-keys (F1, F7) don't work


This example uses the F10 as an example of the ‘F’ key that is not working.
The problem could be down to the F10 key not being defined in the infocmp. A way to check and change this is to run the command: infocmp > a.src

It will export the infocmp into a local file which can be edited.
In a.src there will be an entry of something like ‘kf10=\EOY’. This is the key definition for F10. A way to make sure this is the correct entry is to build a simple 4GL program with a PROMPT to show you the output of this key.
For example:

MAIN
DEFINE a CHAR (10)
PROMPT "Press the F10 key" FOR a
DISPLAY a
SLEEP 3
END MAIN

When you run the program and press the F10 you will see two letters/numbers appear, for example 0Y. Once you have this you can go back to a.src and make sure the entry for F10 (kf10=) ends in 0Y. For example, I have given the correct value for the F10 definition will be ‘kf10=\EOY’. Once this is done save the file and run the command: tic a.src

This will compile the definitions and put them into effect. Now you have done this you can write a simple program to test that the F10 program is working.

For example:

MAIN
MENU "test"
COMMAND KEY ("F10") "F10 Key"
DISPLAY "the f10 key works" AT 12, 2
COMMAND KEY ("x") "Exit"
EXIT MENU
END MENU
END MAIN

When the program is run and you press the F10, you should get a message of “the f10 key works” indicating that your changes worked. Otherwise, you may have to check the output of the prompt again (or look at the value of F9 and move up one letter).