You can use the consoleLib.key_quit system variable to specify the name of the keyboard key that exits the program without validating user input. The default key is CONTROL_\. For a list of key names, see Names for keyboard keys in EGL.
Type: CHAR(32)
consoleLib.key_quit = "KEY_q";