You can use the consoleLib.getKeyName() system function to find the EGL name for a key based on a specified code point. The code point depends upon the local character set where the function runs. In ASCII environments, the function expects an ASCII code; in EBCDIC environments, it expects an EBCDIC code.
consoleLib.getKeyName(codePoint INT in)
returns (result STRING)
The following example requests key input, converts it to a key name, and displays it:
keyName STRING;
...
keyName = consoleLib.getKeyName(consoleLib.getKey());
ConsoleLib.displayAtLine("You pressed " + keyName, 17);