Help with external buttons as inputs


I need help in determining the target area for an external button to “push” the on screen button

What MCU/Processor/Board and compiler are you using?

I’m using a NUCLEO-H7A3ZI-Q board and the STMCubeIDE

What LVGL version are you using?

version 8.3

What do you want to achieve?

I have 5 external buttons equally distributed along the bottom of the display. I need to have the end user push a button and that action trigger the corresponding screen button to activate.

What have you tried so far?

I’m sure how to proceed.

Code to reproduce

For example I place btn2 at this position: lv_obj_align(btn2, LV_ALIGN_BOTTOM_MID, -150, -25);

From the documentation I need to set an area with: const lv_point_t points_array[] = { {12,30},{60,90}, ...}

My question is how do I set the area? For my btn2 do I just use defined -150, -25? Or do I need to calculate the absolute position from the upper left corner?