mirror of https://github.com/acidanthera/audk.git
translate Ctrl + alpha to control value for simple text input protocol
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3952 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
5364ee3303
commit
1f771698b2
|
@ -1622,6 +1622,16 @@ Returns:
|
||||||
ConsoleIn->Key.UnicodeChar = ConvertKeyboardScanCodeToEfiKey[Index].UnicodeChar;
|
ConsoleIn->Key.UnicodeChar = ConvertKeyboardScanCodeToEfiKey[Index].UnicodeChar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
// Translate the CTRL-Alpha characters to their corresponding control value (ctrl-a = 0x0001 through ctrl-Z = 0x001A)
|
||||||
|
//
|
||||||
|
if (ConsoleIn->Ctrled) {
|
||||||
|
if (ConsoleIn->Key.UnicodeChar >= 'a' && ConsoleIn->Key.UnicodeChar <= 'z') {
|
||||||
|
ConsoleIn->Key.UnicodeChar = (UINT16) (ConsoleIn->Key.UnicodeChar - 'a' + 1);
|
||||||
|
} else if (ConsoleIn->Key.UnicodeChar >= 'A' && ConsoleIn->Key.UnicodeChar <= 'Z') {
|
||||||
|
ConsoleIn->Key.UnicodeChar = (UINT16) (ConsoleIn->Key.UnicodeChar - 'A' + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 (KeyChar >= 0x59 && KeyChar <= 0x63) {
|
||||||
|
|
||||||
if (UsbKeyboardDevice->NumLockOn && !UsbKeyboardDevice->ShiftOn) {
|
if (UsbKeyboardDevice->NumLockOn && !UsbKeyboardDevice->ShiftOn) {
|
||||||
|
|
Loading…
Reference in New Issue