diff options
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c')
-rw-r--r-- | ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c index 4eb998bf5f..6832441e81 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c @@ -1387,18 +1387,20 @@ MainCommandDisplayHelp ( continue;
}
- if ((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) == 0) {
+ if (((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) == 0) ||
+ (KeyData.KeyState.KeyShiftState == EFI_SHIFT_STATE_VALID)) {
//
- // For consoles that don't support shift state reporting,
+ // For consoles that don't support/report shift state,
// CTRL+W is translated to L'W' - L'A' + 1.
//
if (KeyData.Key.UnicodeChar == L'W' - L'A' + 1) {
break;
}
- } else if (((KeyData.KeyState.KeyShiftState & (EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) != 0) &&
+ } else if (((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0) &&
+ ((KeyData.KeyState.KeyShiftState & (EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) != 0) &&
((KeyData.KeyState.KeyShiftState & ~(EFI_SHIFT_STATE_VALID | EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) == 0)) {
//
- // For consoles that supports shift state reporting,
+ // For consoles that supports/reports shift state,
// make sure that only CONTROL shift key is pressed.
//
if ((KeyData.Key.UnicodeChar == 'w') || (KeyData.Key.UnicodeChar == 'W')) {
|