Demonstrates setting the command to be invoked when the 'escape' key is pressed. Also demonstrates retrieval of the label of the chosen command and setting a callback to a function. A message will be displayed indicating which command was invoked.
In this scenario, 'Try again' is selected as the default choice, and the 'escape' key will invoke the command named 'Close'