X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FBus%2FUsb%2FUsbKbDxe%2FKeyBoard.c;h=b3b5fb9ff4c49136dcd679f28357592054ee1c94;hp=d140311c525bc9df1f7f55756181ddae3bc696b6;hb=dd190645eb43424706eb1709d0032c69a1935d9f;hpb=c095341cc4c09a59ba285fe3adaa37425721479d diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c index d140311c52..b3b5fb9ff4 100644 --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c @@ -1615,7 +1615,8 @@ UsbKeyCodeToEfiInputKey ( // Need not return associated shift state if a class of printable characters that // are normally adjusted by shift modifiers. e.g. Shift Key + 'f' key = 'F' // - if ((KeyDescriptor->AffectedAttribute & EFI_AFFECTED_BY_CAPS_LOCK) != 0) { + if ((KeyDescriptor->Unicode != CHAR_NULL) && (KeyDescriptor->ShiftedUnicode != CHAR_NULL) && + (KeyDescriptor->Unicode != KeyDescriptor->ShiftedUnicode)) { UsbKeyboardDevice->LeftShiftOn = FALSE; UsbKeyboardDevice->RightShiftOn = FALSE; }