\r
switch (Key.UnicodeChar) {\r
case CHAR_CARRIAGE_RETURN:\r
+ if(MenuOption->GrayOut || MenuOption->ReadOnly) {\r
+ ControlFlag = CfReadKey;\r
+ break;\r
+ }\r
+\r
ScreenOperation = UiSelect;\r
gDirection = 0;\r
break;\r
// If the screen has no menu items, and the user didn't select UiReset\r
// ignore the selection and go back to reading keys.\r
//\r
- if(IsListEmpty (&gMenuOption)) {\r
+ if(IsListEmpty (&gMenuOption) || MenuOption->GrayOut || MenuOption->ReadOnly) {\r
ControlFlag = CfReadKey;\r
break;\r
}\r
}\r
\r
ASSERT(MenuOption != NULL);\r
- if (MenuOption->ThisTag->Operand == EFI_IFR_CHECKBOX_OP && !MenuOption->GrayOut) {\r
+ if (MenuOption->ThisTag->Operand == EFI_IFR_CHECKBOX_OP && !MenuOption->GrayOut && !MenuOption->ReadOnly) {\r
ScreenOperation = UiSelect;\r
}\r
}\r