Skip to main content
sute
Associate III
March 24, 2023
Solved

Prevent double clicks on TouchGFX button

  • March 24, 2023
  • 2 replies
  • 1650 views

I have a TouchGFX project with some buttons used for navigating a menu. The problem is that for some reason every couple of touches is registered as a double click. So I click the touch button once, but the virtual function called by the click event is called twice. Any way to decrease the sensitivity?

I can do this in the source code, but wondering if there is a way directly in TouchGFX designer.

This topic has been closed for replies.
Best answer by Yoann KLEIN

Hello @MS.12utela​,

Actually, when you click a button in TouchGFX, it does not register a double-click event, but it triggers a handler with a pressed event parameter when you press the button, and when you release your finger from the button, it passes a released event to the handler.

You can get inspiration on how to decouple those 2 events from this post.

Hope that helps,

/Yoann

2 replies

Yoann KLEIN
Yoann KLEINBest answer
ST Employee
March 28, 2023

Hello @MS.12utela​,

Actually, when you click a button in TouchGFX, it does not register a double-click event, but it triggers a handler with a pressed event parameter when you press the button, and when you release your finger from the button, it passes a released event to the handler.

You can get inspiration on how to decouple those 2 events from this post.

Hope that helps,

/Yoann

Yoann KLEINST Software Developer | TouchGFX
sute
suteAuthor
Associate III
March 30, 2023

Thanks! This will help