From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9E63B21F6A6E7 for ; Fri, 23 Feb 2018 23:07:49 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Feb 2018 23:13:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,386,1515484800"; d="scan'208";a="37096273" Received: from ray-dev.ccr.corp.intel.com ([10.239.9.13]) by orsmga002.jf.intel.com with ESMTP; 23 Feb 2018 23:13:50 -0800 From: Ruiyu Ni To: edk2-devel@lists.01.org Cc: Star Zeng Date: Sat, 24 Feb 2018 15:13:48 +0800 Message-Id: <20180224071348.132760-1-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.16.1.windows.1 Subject: [PATCH] MdeModulePkg/Terminal: ReadKeyStrokeEx always return key state X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Feb 2018 07:07:50 -0000 Because terminal doesn't support shift and toggle key state, ReadKeyStrokeEx just sets the two states to 0. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Star Zeng --- MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c index 3c1102dac4..99316376cb 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c @@ -2,7 +2,7 @@ Implementation for EFI_SIMPLE_TEXT_INPUT_PROTOCOL protocol. (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (C) 2016 Silicon Graphics, Inc. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -41,13 +41,12 @@ ReadKeyStrokeWorker ( return EFI_INVALID_PARAMETER; } - if (!EfiKeyFiFoRemoveOneKey (TerminalDevice, &KeyData->Key)) { - return EFI_NOT_READY; - } - KeyData->KeyState.KeyShiftState = 0; KeyData->KeyState.KeyToggleState = 0; + if (!EfiKeyFiFoRemoveOneKey (TerminalDevice, &KeyData->Key)) { + return EFI_NOT_READY; + } return EFI_SUCCESS; -- 2.16.1.windows.1