I found it !
The error was my assigning data.btn_id = but.id
. I had to wade through the source code (see indev_button_proc
in line 661 of lv_core/lv_indev.c) to discover that the btn_id parameter is the index where the input device driver finds the point to press.
So if I declare
lv.indev_set_button_points(win_drv, [pointA, pointB])
then if in the read callback, I set data.btn_id = 1
, the point that will be pressed is the whose coordinates are in pointB
.
The documentation is less than clear on this. A question remains: how do I press more than one screen point at once? I thought that the button_points array listed the points that would be clicked…