The fgl_keyname() function has been provided as a reverse to the fgl_keyval() function in that it will provide the keyname corresponding to the key value provided.
This function takes an integer parameter representing a key value, and returns a VARCHAR(n) which is the key name associated with the given value.
For example, this code would return 'escape':
DEFINE i INTEGER
DEFINE c CHAR(20)
LET i = fgl_keyval("Escape")
LET c = fgl_keyname(i)