]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fixed issue that addition LEFT CTRL key was detected when press PAUSE key. PS2 keybo...
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 8 Sep 2011 03:36:58 +0000 (03:36 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 8 Sep 2011 03:36:58 +0000 (03:36 +0000)
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

IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c
IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h

index 93fdf6d94f4dd0373052aaf69e142838b1064aea..1b6ed43bd374c104d08ac9b6b53e422af410e728 100644 (file)
@@ -551,7 +551,7 @@ ConvertKeyboardScanCodeToEfiKey[] = {
     0x0000\r
   },  \r
   {\r
-    0x1D45,  //Pause key\r
+    SCANCODE_PAUSE_MAKE,  //Pause key\r
     SCAN_PAUSE,\r
     0x0000,\r
     0x0000\r
@@ -1166,9 +1166,9 @@ KeyGetchar (
   LIST_ENTRY                     *Link;\r
   KEYBOARD_CONSOLE_IN_EX_NOTIFY  *CurrentNotify;\r
   //\r
-  // 4 bytes most\r
+  // 6 bytes most\r
   //\r
-  UINT8                          ScancodeArr[4];\r
+  UINT8                          ScancodeArr[6];\r
   UINT32                         ScancodeArrPos;\r
   \r
   //\r
@@ -1201,16 +1201,11 @@ KeyGetchar (
     //\r
     if (ScancodeArr[ScancodeArrPos] == SCANCODE_EXTENDED1) {\r
       Extended1       = TRUE;\r
-      Status          = GetScancodeBufHead (&ConsoleIn->ScancodeQueue, 2, ScancodeArr);\r
-      ScancodeArrPos  = 1;\r
-\r
-      if (EFI_ERROR (Status)) {\r
-        return ;\r
-      }\r
-\r
-      Status          = GetScancodeBufHead (&ConsoleIn->ScancodeQueue, 3, ScancodeArr);\r
-      ScancodeArrPos  = 2;\r
-\r
+      //\r
+      // Try to read the whole bytes of scancode for PAUSE key\r
+      //\r
+      Status          = GetScancodeBufHead (&ConsoleIn->ScancodeQueue, 6, ScancodeArr);\r
+      ScancodeArrPos  = 5;\r
       if (EFI_ERROR (Status)) {\r
         return ;\r
       }\r
index cb6abb5204e0d5e896fc5b91b9dd594c78755467..2313a643cbdf34aabf471eb335bf1a371db3a571 100644 (file)
@@ -183,7 +183,7 @@ InstallPs2KeyboardDriver (
 #define SCANCODE_SYS_REQ_MAKE           0x37\r
 #define SCANCODE_MAX_MAKE               0x60\r
 \r
-#define SCANCODE_PAUSE_MAKE             0x1D45\r
+#define SCANCODE_PAUSE_MAKE             0x9DC5 // The last two bytes of scancode for PAUSE key\r
 \r
 #define KEYBOARD_STATUS_REGISTER_HAS_OUTPUT_DATA     BIT0        ///< 0 - Output register has no data; 1 - Output register has data\r
 #define KEYBOARD_STATUS_REGISTER_HAS_INPUT_DATA      BIT1        ///< 0 - Input register has no data;  1 - Input register has data\r