summaryrefslogtreecommitdiff
path: root/Nt32Pkg
diff options
context:
space:
mode:
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-25 06:12:18 +0000
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-25 06:12:18 +0000
commit7ad45baa7dd37261614dc27b0d0f78b7159845a9 (patch)
treea499e7a9173f424e33195debe26ea7d3040dbf56 /Nt32Pkg
parent608817ad711405a7e596bb0f28af52fb3c340509 (diff)
Change the SimpleTextInEx implementation to return CTRL+C when CTRL and C are both pressed; SimpleTextIn implementation still returns CTRL+3.
Signed-off-by: niruiyu Reviewed-by: qianouyang git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12564 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Nt32Pkg')
-rw-r--r--Nt32Pkg/WinNtGopDxe/WinNtGopInput.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/Nt32Pkg/WinNtGopDxe/WinNtGopInput.c b/Nt32Pkg/WinNtGopDxe/WinNtGopInput.c
index cc05a5d1b..ee1a98cde 100644
--- a/Nt32Pkg/WinNtGopDxe/WinNtGopInput.c
+++ b/Nt32Pkg/WinNtGopDxe/WinNtGopInput.c
@@ -362,16 +362,6 @@ GopPrivateAddKey (
GopPrivateAddQ (Private, &Private->QueueForNotify, &KeyData);
- //
- // Convert Ctrl+[A-Z] to Ctrl+[1-26]
- //
- if (Private->LeftCtrl || Private->RightCtrl) {
- if ((KeyData.Key.UnicodeChar >= L'a') && (KeyData.Key.UnicodeChar <= L'z')) {
- KeyData.Key.UnicodeChar = (CHAR16)(KeyData.Key.UnicodeChar - L'a' + 1);
- } else if ((KeyData.Key.UnicodeChar >= L'A') && (KeyData.Key.UnicodeChar <= L'Z')) {
- KeyData.Key.UnicodeChar = (CHAR16)(KeyData.Key.UnicodeChar - L'A' + 1);
- }
- }
GopPrivateAddQ (Private, &Private->QueueForRead, &KeyData);
return EFI_SUCCESS;
@@ -605,6 +595,16 @@ WinNtGopSimpleTextInReadKeyStroke (
if (KeyData.Key.ScanCode == SCAN_NULL && KeyData.Key.UnicodeChar == CHAR_NULL) {
continue;
}
+ //
+ // Convert Ctrl+[A-Z] to Ctrl+[1-26]
+ //
+ if ((KeyData.KeyState.KeyShiftState & (EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) != 0) {
+ if ((KeyData.Key.UnicodeChar >= L'a') && (KeyData.Key.UnicodeChar <= L'z')) {
+ KeyData.Key.UnicodeChar = (CHAR16) (KeyData.Key.UnicodeChar - L'a' + 1);
+ } else if ((KeyData.Key.UnicodeChar >= L'A') && (KeyData.Key.UnicodeChar <= L'Z')) {
+ KeyData.Key.UnicodeChar = (CHAR16) (KeyData.Key.UnicodeChar - L'A' + 1);
+ }
+ }
CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
return EFI_SUCCESS;
}