diff options
Diffstat (limited to 'MdeModulePkg/Bus/Usb/UsbKbDxe')
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbKbDxe/keyboard.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/keyboard.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/keyboard.c index 44914afb54..9ad1bcef24 100644 --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/keyboard.c +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/keyboard.c @@ -857,7 +857,18 @@ USBKeyCodeToEFIScanCode ( }
}
-
+ //
+ // Translate the CTRL-Alpha characters to their corresponding control value (ctrl-a = 0x0001 through ctrl-Z = 0x001A)
+ //
+ if (UsbKeyboardDevice->CtrlOn) {
+ if (Key->UnicodeChar >= 'a' && Key->UnicodeChar <= 'z') {
+ Key->UnicodeChar = (UINT16) (Key->UnicodeChar - 'a' + 1);
+ } else if (Key->UnicodeChar >= 'A' && Key->UnicodeChar <= 'Z') {
+ Key->UnicodeChar = (UINT16) (Key->UnicodeChar - 'A' + 1);
+ }
+ }
+
+
if (KeyChar >= 0x59 && KeyChar <= 0x63) {
if (UsbKeyboardDevice->NumLockOn && !UsbKeyboardDevice->ShiftOn) {
|