summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-08 03:36:58 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-08 03:36:58 +0000
commit8a30d785c3c4dbb37cea8f96fad2bb951e9f4cd2 (patch)
treea505fd30b3e07e7e364bf709104db018af5f8764 /IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c
parent16a48731fcbf658569571490cbcc46df8d254bb7 (diff)
downloadedk2-platforms-8a30d785c3c4dbb37cea8f96fad2bb951e9f4cd2.tar.xz
Fixed issue that addition LEFT CTRL key was detected when press PAUSE key. PS2 keyboard driver should consume all bytes of scan code for PAUSE key.
Signed-off-by: vanjeff Reviewed-by: niruiyu git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12298 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c')
-rw-r--r--IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c
index 93fdf6d94f..1b6ed43bd3 100644
--- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c
+++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c
@@ -551,7 +551,7 @@ ConvertKeyboardScanCodeToEfiKey[] = {
0x0000
},
{
- 0x1D45, //Pause key
+ SCANCODE_PAUSE_MAKE, //Pause key
SCAN_PAUSE,
0x0000,
0x0000
@@ -1166,9 +1166,9 @@ KeyGetchar (
LIST_ENTRY *Link;
KEYBOARD_CONSOLE_IN_EX_NOTIFY *CurrentNotify;
//
- // 4 bytes most
+ // 6 bytes most
//
- UINT8 ScancodeArr[4];
+ UINT8 ScancodeArr[6];
UINT32 ScancodeArrPos;
//
@@ -1201,16 +1201,11 @@ KeyGetchar (
//
if (ScancodeArr[ScancodeArrPos] == SCANCODE_EXTENDED1) {
Extended1 = TRUE;
- Status = GetScancodeBufHead (&ConsoleIn->ScancodeQueue, 2, ScancodeArr);
- ScancodeArrPos = 1;
-
- if (EFI_ERROR (Status)) {
- return ;
- }
-
- Status = GetScancodeBufHead (&ConsoleIn->ScancodeQueue, 3, ScancodeArr);
- ScancodeArrPos = 2;
-
+ //
+ // Try to read the whole bytes of scancode for PAUSE key
+ //
+ Status = GetScancodeBufHead (&ConsoleIn->ScancodeQueue, 6, ScancodeArr);
+ ScancodeArrPos = 5;
if (EFI_ERROR (Status)) {
return ;
}