2020-09-19 08: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.
2020-09-20 02: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
2020-09-20 02: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
2020-09-21 06:57 PM
Thanks,I try it and it works.