//\r
ControlIndex = MAX_UINT16;\r
\r
- if ((KeyData->KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) == 0) {\r
+ if (((KeyData->KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) == 0) ||\r
+ (KeyData->KeyState.KeyShiftState == EFI_SHIFT_STATE_VALID)) {\r
//\r
- // For those console devices that cannot report the CONTROL state,\r
+ // For consoles that don't support/report shift state,\r
// Ctrl+A is translated to 1 (UnicodeChar).\r
//\r
ControlIndex = KeyData->Key.UnicodeChar;\r
- } else if (((KeyData->KeyState.KeyShiftState & (EFI_RIGHT_CONTROL_PRESSED | EFI_LEFT_CONTROL_PRESSED)) != 0) &&\r
+ } else if (((KeyData->KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0) &&\r
+ ((KeyData->KeyState.KeyShiftState & (EFI_RIGHT_CONTROL_PRESSED | EFI_LEFT_CONTROL_PRESSED)) != 0) &&\r
((KeyData->KeyState.KeyShiftState & ~(EFI_SHIFT_STATE_VALID | EFI_RIGHT_CONTROL_PRESSED | EFI_LEFT_CONTROL_PRESSED)) == 0)) {\r
//\r
- // For those console devices that can report the CONTROL state,\r
+ // For consoles that supports/reports shift state,\r
// make sure only CONTROL is pressed.\r
//\r
if ((KeyData->Key.UnicodeChar >= L'A') && (KeyData->Key.UnicodeChar <= L'Z')) {\r