[TouchGFX]How to use the Trigger "Hardware button is clicked"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-09-19 8:57 PM
I want to use the Interaction function "Hardware button is clicked" .
Can it work in PC simulation? Like i press 'w' on the keyboard of PC,and it call a function.
Is there an example program for it.
Solved! Go to Solution.
- Labels:
-
TouchGFX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-09-20 2:57 AM
Simply as on image and in code you can call it in model example down
if ((HAL_GPIO_ReadPin(SW3_GPIO_Port, SW3_Pin) == GPIO_PIN_RESET && filter == false) ) // any gpio button check
{
filter = true;
static_cast<FrontendApplication*>(Application::getInstance())->handleKeyEvent(88); // keycode from image send
}
In simulator you can use key 88 X on pc keyboard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-09-20 2:57 AM
Simply as on image and in code you can call it in model example down
if ((HAL_GPIO_ReadPin(SW3_GPIO_Port, SW3_Pin) == GPIO_PIN_RESET && filter == false) ) // any gpio button check
{
filter = true;
static_cast<FrontendApplication*>(Application::getInstance())->handleKeyEvent(88); // keycode from image send
}
In simulator you can use key 88 X on pc keyboard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-09-21 6:57 PM
Thanks,I try it and it works.
