Other vendor PXE stacks tend to allow the Escape key to be used to
abort menu selection. Allow Escape (as well as Ctrl-C) to abort
selection.
if ( ( key == CR ) || ( key == LF ) ) {
pxe_menu_draw_item ( menu, menu->selection, 1 );
break;
- } else if ( key == CTRL_C ) {
+ } else if ( ( key == CTRL_C ) || ( key == ESC ) ) {
rc = -ECANCELED;
break;
} else if ( key == KEY_UP ) {
/* Display menu */
printf ( "\n" );
return pxe_menu_select ( menu );
- } else if ( key == CTRL_C ) {
+ } else if ( ( key == CTRL_C ) || ( key == ESC ) ) {
/* Abort */
rc = -ECANCELED;
break;