From: "KalaiyarasanX Thangaraj" <KalaiyarasanX.Thangaraj@intel.com>
To: devel@edk2.groups.io
Cc: KalaiyarasanX Thangaraj <kalaiyarasanx.thangaraj@intel.com>,
Dandan Bi <dandan.bi@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Madhan Pethaiyan <madhan.pethaiyan@intel.com>,
Kathappan Esakkithevar <kathappan.esakkithevar@intel.com>,
Madhusudhan Balaji <madhusudhan.balaji@intel.com>
Subject: [PATCH] VirtualKeyboardFeaturePkg: Pre OS virtual keyboard touch response are very slow with I2C touch panel
Date: Wed, 27 Jul 2022 20:44:06 +0530 [thread overview]
Message-ID: <20220727151406.1334-1-kalaiyarasanx.thangaraj@intel.com> (raw)
On one Touch, multiple Reads happend and this reads varying based on Key Press time.
Resulting in Multiple key press update on screen. This condition avoids KeyPressed skips
resulting due to faster key press and update only on valid key press.
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Madhan Pethaiyan <madhan.pethaiyan@intel.com>
Cc: Kathappan Esakkithevar <kathappan.esakkithevar@intel.com>
Cc: Madhusudhan Balaji <madhusudhan.balaji@intel.com>
Signed-off-by: KalaiyarasanX Thangaraj <kalaiyarasanx.thangaraj@intel.com>
---
Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/Keyboard.c | 12 ++++++++++++
Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboard.h | 3 +++
2 files changed, 15 insertions(+)
diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/Keyboard.c b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/Keyboard.c
index 2b1216746b..aa4bfe3baa 100644
--- a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/Keyboard.c
+++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/Keyboard.c
@@ -512,6 +512,18 @@ VkTimer (
if (!VkContext->TouchActive) {
VkContext->KeyPressed = FALSE;
}
+
+ //
+ // On one Touch, multiple Reads happend and this reads varying based on Key Press time.
+ // Resulting in Multiple key press update on screen. This condition avoids Key Press skips
+ // resulting due to faster key press and update only on valid key press.
+ //
+ if ((Point.CurrentX != PreviousX) || (Point.CurrentY != PreviousY)) {
+ VkContext->KeyPressed = FALSE;
+ }
+ PreviousX = Point.CurrentX;
+ PreviousY = Point.CurrentY;
+
ConvertCoordinate (VkContext, Point, &TouchX, &TouchY);
if (!VkContext->KeyPressed &&
diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboard.h b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboard.h
index 14a50fa5af..11e045f894 100644
--- a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboard.h
+++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboard.h
@@ -37,6 +37,9 @@ extern EFI_DRIVER_BINDING_PROTOCOL gVirtualKeyboardDriverBinding;
extern EFI_COMPONENT_NAME_PROTOCOL gVirtualKeyboardComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gVirtualKeyboardComponentName2;
+GLOBAL_REMOVE_IF_UNREFERENCED UINTN PreviousX;
+GLOBAL_REMOVE_IF_UNREFERENCED UINTN PreviousY;
+
///
/// Debug raw data points
///
--
2.26.2.windows.1
next reply other threads:[~2022-07-27 15:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-27 15:14 KalaiyarasanX Thangaraj [this message]
2022-07-28 7:43 ` [PATCH] VirtualKeyboardFeaturePkg: Pre OS virtual keyboard touch response are very slow with I2C touch panel Balaji, Madhusudhan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220727151406.1334-1-kalaiyarasanx.thangaraj@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox