* [PATCH 2] VirtualKeyboardFeaturePkg: Pre OS virtual keyboard touch response are very slow with I2C touch panel @ 2022-08-02 9:18 KalaiyarasanX Thangaraj 2022-08-02 17:01 ` Balaji, Madhusudhan 0 siblings, 1 reply; 3+ messages in thread From: KalaiyarasanX Thangaraj @ 2022-08-02 9:18 UTC (permalink / raw) To: devel@edk2.groups.io Cc: Thangaraj, KalaiyarasanX, Bi, Dandan, Gao, Liming, Pethaiyan, Madhan, Esakkithevar, Kathappan, Balaji, Madhusudhan [-- Attachment #1: Type: text/plain, Size: 2981 bytes --] 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<mailto:dandan.bi@intel.com> Cc: Liming Gao gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn> Cc: Madhan Pethaiyan madhan.pethaiyan@intel.com<mailto:madhan.pethaiyan@intel.com> Cc: Kathappan Esakkithevar kathappan.esakkithevar@intel.com<mailto:kathappan.esakkithevar@intel.com> Cc: Madhusudhan Balaji madhusudhan.balaji@intel.com<mailto:madhusudhan.balaji@intel.com> Signed-off-by: KalaiyarasanX Thangaraj kalaiyarasanx.thangaraj@intel.com<mailto:kalaiyarasanx.thangaraj@intel.com> --- Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/Keyboard.c | 12 ++++++++++++ Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboard.h | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/Keyboard.c b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/Keyboard.c index 2b1216746b..8c9d5b9a86 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 != VkContext->PreviousX) || (Point.CurrentY != VkContext->PreviousY)) { + VkContext->KeyPressed = FALSE; + } + VkContext->PreviousX = Point.CurrentX; + VkContext->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..7090730861 100644 --- a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboard.h +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboard.h @@ -373,6 +373,12 @@ struct _VK_CONTEXT { BOOLEAN IsRedrawUpdateUI; VK_PAGE_TYPE PageNumber; LIST_ENTRY NotifyList; + + /// + /// Previous X and Y axis Buffer + /// + UINTN PreviousX; + UINTN PreviousY; }; /// -- 2.26.2.windows.1 [-- Attachment #2: Type: text/html, Size: 7655 bytes --] ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2] VirtualKeyboardFeaturePkg: Pre OS virtual keyboard touch response are very slow with I2C touch panel 2022-08-02 9:18 [PATCH 2] VirtualKeyboardFeaturePkg: Pre OS virtual keyboard touch response are very slow with I2C touch panel KalaiyarasanX Thangaraj @ 2022-08-02 17:01 ` Balaji, Madhusudhan 2022-08-03 1:50 ` Dandan Bi 0 siblings, 1 reply; 3+ messages in thread From: Balaji, Madhusudhan @ 2022-08-02 17:01 UTC (permalink / raw) To: Thangaraj, KalaiyarasanX, devel@edk2.groups.io Cc: Bi, Dandan, Gao, Liming, Pethaiyan, Madhan, Esakkithevar, Kathappan, Balaji, Madhusudhan [-- Attachment #1: Type: text/plain, Size: 3673 bytes --] --------- Reviewed-by:Balaji, Madhusudhan madhusudhan.balaji@intel.com<mailto:madhusudhan.balaji@intel.com> -------------- From: Thangaraj, KalaiyarasanX <kalaiyarasanx.thangaraj@intel.com> Sent: Tuesday, August 2, 2022 2:49 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 2] 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<mailto:dandan.bi@intel.com> Cc: Liming Gao gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn> Cc: Madhan Pethaiyan madhan.pethaiyan@intel.com<mailto:madhan.pethaiyan@intel.com> Cc: Kathappan Esakkithevar kathappan.esakkithevar@intel.com<mailto:kathappan.esakkithevar@intel.com> Cc: Madhusudhan Balaji madhusudhan.balaji@intel.com<mailto:madhusudhan.balaji@intel.com> Signed-off-by: KalaiyarasanX Thangaraj kalaiyarasanx.thangaraj@intel.com<mailto:kalaiyarasanx.thangaraj@intel.com> --- Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/Keyboard.c | 12 ++++++++++++ Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboard.h | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/Keyboard.c b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/Keyboard.c index 2b1216746b..8c9d5b9a86 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 != VkContext->PreviousX) || (Point.CurrentY != VkContext->PreviousY)) { + VkContext->KeyPressed = FALSE; + } + VkContext->PreviousX = Point.CurrentX; + VkContext->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..7090730861 100644 --- a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboard.h +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboard.h @@ -373,6 +373,12 @@ struct _VK_CONTEXT { BOOLEAN IsRedrawUpdateUI; VK_PAGE_TYPE PageNumber; LIST_ENTRY NotifyList; + + /// + /// Previous X and Y axis Buffer + /// + UINTN PreviousX; + UINTN PreviousY; }; /// -- 2.26.2.windows.1 [-- Attachment #2: Type: text/html, Size: 10320 bytes --] ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2] VirtualKeyboardFeaturePkg: Pre OS virtual keyboard touch response are very slow with I2C touch panel 2022-08-02 17:01 ` Balaji, Madhusudhan @ 2022-08-03 1:50 ` Dandan Bi 0 siblings, 0 replies; 3+ messages in thread From: Dandan Bi @ 2022-08-03 1:50 UTC (permalink / raw) To: Balaji, Madhusudhan, Thangaraj, KalaiyarasanX, devel@edk2.groups.io Cc: Gao, Liming, Pethaiyan, Madhan, Esakkithevar, Kathappan [-- Attachment #1: Type: text/plain, Size: 4607 bytes --] Reviewed-by: Dandan Bi <dandan.bi@intel.com<mailto:dandan.bi@intel.com>> Thanks, Dandan From: Balaji, Madhusudhan <madhusudhan.balaji@intel.com> Sent: Wednesday, August 3, 2022 1:02 AM To: Thangaraj, KalaiyarasanX <kalaiyarasanx.thangaraj@intel.com>; devel@edk2.groups.io Cc: 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: RE: [PATCH 2] VirtualKeyboardFeaturePkg: Pre OS virtual keyboard touch response are very slow with I2C touch panel --------- Reviewed-by:Balaji, Madhusudhan madhusudhan.balaji@intel.com<mailto:madhusudhan.balaji@intel.com> -------------- From: Thangaraj, KalaiyarasanX <kalaiyarasanx.thangaraj@intel.com<mailto:kalaiyarasanx.thangaraj@intel.com>> Sent: Tuesday, August 2, 2022 2:49 PM To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> Cc: Thangaraj, KalaiyarasanX <kalaiyarasanx.thangaraj@intel.com<mailto:kalaiyarasanx.thangaraj@intel.com>>; Bi, Dandan <dandan.bi@intel.com<mailto:dandan.bi@intel.com>>; Gao, Liming <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>; Pethaiyan, Madhan <madhan.pethaiyan@intel.com<mailto:madhan.pethaiyan@intel.com>>; Esakkithevar, Kathappan <kathappan.esakkithevar@intel.com<mailto:kathappan.esakkithevar@intel.com>>; Balaji, Madhusudhan <madhusudhan.balaji@intel.com<mailto:madhusudhan.balaji@intel.com>> Subject: [PATCH 2] 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<mailto:dandan.bi@intel.com> Cc: Liming Gao gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn> Cc: Madhan Pethaiyan madhan.pethaiyan@intel.com<mailto:madhan.pethaiyan@intel.com> Cc: Kathappan Esakkithevar kathappan.esakkithevar@intel.com<mailto:kathappan.esakkithevar@intel.com> Cc: Madhusudhan Balaji madhusudhan.balaji@intel.com<mailto:madhusudhan.balaji@intel.com> Signed-off-by: KalaiyarasanX Thangaraj kalaiyarasanx.thangaraj@intel.com<mailto:kalaiyarasanx.thangaraj@intel.com> --- Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/Keyboard.c | 12 ++++++++++++ Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboard.h | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/Keyboard.c b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/Keyboard.c index 2b1216746b..8c9d5b9a86 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 != VkContext->PreviousX) || (Point.CurrentY != VkContext->PreviousY)) { + VkContext->KeyPressed = FALSE; + } + VkContext->PreviousX = Point.CurrentX; + VkContext->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..7090730861 100644 --- a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboard.h +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboard.h @@ -373,6 +373,12 @@ struct _VK_CONTEXT { BOOLEAN IsRedrawUpdateUI; VK_PAGE_TYPE PageNumber; LIST_ENTRY NotifyList; + + /// + /// Previous X and Y axis Buffer + /// + UINTN PreviousX; + UINTN PreviousY; }; /// -- 2.26.2.windows.1 [-- Attachment #2: Type: text/html, Size: 12046 bytes --] ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-03 1:50 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-08-02 9:18 [PATCH 2] VirtualKeyboardFeaturePkg: Pre OS virtual keyboard touch response are very slow with I2C touch panel KalaiyarasanX Thangaraj 2022-08-02 17:01 ` Balaji, Madhusudhan 2022-08-03 1:50 ` Dandan Bi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox