continue;\r
}\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 consoles that don't support shift state reporting,\r
+ // For consoles that don't support/report shift state,\r
// CTRL+W is translated to L'W' - L'A' + 1.\r
//\r
if (KeyData.Key.UnicodeChar == L'W' - L'A' + 1) {\r
break;\r
}\r
- } else if (((KeyData.KeyState.KeyShiftState & (EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) != 0) &&\r
+ } else if (((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0) &&\r
+ ((KeyData.KeyState.KeyShiftState & (EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) != 0) &&\r
((KeyData.KeyState.KeyShiftState & ~(EFI_SHIFT_STATE_VALID | EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) == 0)) {\r
//\r
- // For consoles that supports shift state reporting,\r
+ // For consoles that supports/reports shift state,\r
// make sure that only CONTROL shift key is pressed.\r
//\r
if ((KeyData.Key.UnicodeChar == 'w') || (KeyData.Key.UnicodeChar == 'W')) {\r