* [PATCH] VirtualKeyboardFeaturePkg: Pre OS virtual keyboard touch response are very slow with I2C touch panel
@ 2022-07-27 15:14 KalaiyarasanX Thangaraj
2022-07-28 7:43 ` Balaji, Madhusudhan
0 siblings, 1 reply; 2+ messages in thread
From: KalaiyarasanX Thangaraj @ 2022-07-27 15:14 UTC (permalink / raw)
To: devel
Cc: KalaiyarasanX Thangaraj, Dandan Bi, Liming Gao, Madhan Pethaiyan,
Kathappan Esakkithevar, Madhusudhan Balaji
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] VirtualKeyboardFeaturePkg: Pre OS virtual keyboard touch response are very slow with I2C touch panel
2022-07-27 15:14 [PATCH] VirtualKeyboardFeaturePkg: Pre OS virtual keyboard touch response are very slow with I2C touch panel KalaiyarasanX Thangaraj
@ 2022-07-28 7:43 ` Balaji, Madhusudhan
0 siblings, 0 replies; 2+ messages in thread
From: Balaji, Madhusudhan @ 2022-07-28 7:43 UTC (permalink / raw)
To: Thangaraj, KalaiyarasanX, devel@edk2.groups.io
Cc: Bi, Dandan, Gao, Liming, Pethaiyan, Madhan,
Esakkithevar, Kathappan, Balaji, Madhusudhan
-----Original Message-----
From: Thangaraj, KalaiyarasanX <kalaiyarasanx.thangaraj@intel.com>
Sent: Wednesday, July 27, 2022 8:44 PM
To: devel@edk2.groups.io
Cc: Thangaraj, KalaiyarasanX <kalaiyarasanx.thangaraj@intel.com>; Bi, Dandan <dandan.bi@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Pethaiyan, Madhan <madhan.pethaiyan@intel.com>; Esakkithevar, Kathappan <kathappan.esakkithevar@intel.com>; Balaji, Madhusudhan <madhusudhan.balaji@intel.com>
Subject: [PATCH] VirtualKeyboardFeaturePkg: Pre OS virtual keyboard touch response are very slow with I2C touch panel
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>
Reviewed-by: Madhusudhan Balaji <madhusudhan.balaji@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/VirtualKeyb
+++ oardDxe/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/VirtualKeyb
+++ oardDxe/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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-28 7:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-27 15:14 [PATCH] VirtualKeyboardFeaturePkg: Pre OS virtual keyboard touch response are very slow with I2C touch panel KalaiyarasanX Thangaraj
2022-07-28 7:43 ` Balaji, Madhusudhan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox