From af1600fd9a0b9a413cfc2b031c641002beafd48f Mon Sep 17 00:00:00 2001 From: qianouyang Date: Wed, 26 Oct 2011 09:36:55 +0000 Subject: =?UTF-8?q?Fix=20a=20bug=20which=20cause=20a=20CRTL,=20ALT,=20or?= =?UTF-8?q?=20SHIFT=20is=20pressed=20on=20the=20GOP=20console=20for=20NT32?= =?UTF-8?q?,=20it=20inserts=20a=20'=20'character=20character.=20Root=20cau?= =?UTF-8?q?se=20is=20that=20the=20parameter=20of=20UnicodeStr=20doesn?= =?UTF-8?q?=E2=80=99t=20initialize.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: qianouyang Reviewed-by: niruiyu git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12575 6f19259b-4bc3-4df7-8a09-765794883524 --- Nt32Pkg/WinNtGopDxe/WinNtGopScreen.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Nt32Pkg/WinNtGopDxe/WinNtGopScreen.c b/Nt32Pkg/WinNtGopDxe/WinNtGopScreen.c index 85848aa..607caad 100644 --- a/Nt32Pkg/WinNtGopDxe/WinNtGopScreen.c +++ b/Nt32Pkg/WinNtGopDxe/WinNtGopScreen.c @@ -781,7 +781,7 @@ WinNtGopThreadWindowProc ( // The ESC key also generate WM_CHAR. // if (wParam == 0x1B) { - return 0; + return 0; } if (AltIsPress == TRUE) { @@ -815,15 +815,13 @@ WinNtGopThreadWindowProc ( return 0; case WM_KEYDOWN: - Key.ScanCode = SCAN_NULL; + Key.ScanCode = SCAN_NULL; + Key.UnicodeChar = CHAR_NULL; // // A value key press will cause a WM_KEYDOWN first, then cause a WM_CHAR // So if there is no modifier key updated, skip the WM_KEYDOWN even. // if (WinNtGopConvertParamToEfiKey (Private, &wParam, &lParam, &Key)) { - if (Key.ScanCode != SCAN_NULL) { - Key.UnicodeChar = CHAR_NULL; - } // // Support the partial keystroke, add all keydown event into the queue. // -- cgit v1.1