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
This commit is contained in:
vanjeff 2011-09-08 03:36:58 +00:00
parent 16a48731fc
commit 8a30d785c3
2 changed files with 9 additions and 14 deletions

View File

@ -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 ;
}

View File

@ -183,7 +183,7 @@ InstallPs2KeyboardDriver (
#define SCANCODE_SYS_REQ_MAKE 0x37
#define SCANCODE_MAX_MAKE 0x60
#define SCANCODE_PAUSE_MAKE 0x1D45
#define SCANCODE_PAUSE_MAKE 0x9DC5 // The last two bytes of scancode for PAUSE key
#define KEYBOARD_STATUS_REGISTER_HAS_OUTPUT_DATA BIT0 ///< 0 - Output register has no data; 1 - Output register has data
#define KEYBOARD_STATUS_REGISTER_HAS_INPUT_DATA BIT1 ///< 0 - Input register has no data; 1 - Input register has data