This article provides information about how to prevent the escape (ESC) key from automatically closing a custom dialog.
Currently, there is no G2 configuration or method that prevents the ESC key from closing a custom dialog in G2. You can configure a keystroke to invoke a user menu choice or any of G2’s system-defined menu choices (Gensym's Reference Manual, page 307). However, if you were to disable the ESC key configuring keystrokes, you would find that this configuration does not take effect for custom-dialogs.
The ESC key cannot be disabled because the action of closing the dialog is coming from the computer's OS itself and not from the G2 software. One way this could be accomplished is by installing a keyboard key disabler on the computer used to connect to G2 either directly or through Telewindows. Please note that this workaround will affect all other applications as well, not only G2 server.