How set mouse cursor

I’m trying to add a mouse cursor. There is the following code

import lvgl as lv

img = lv.img(lv.scr_act(), None)
img.set_src(lv.SYMBOL.OK)
lv.indev_t.set_cursor(lv.indev_t(), img)

The cursor appears on the screen, but does not move. In this case, the buttons on my form react to the invisible cursor clicks.

How do I make a real cursor to work? How to do it correctly? What should be substituted in the first argument “lv.indev_t.set_cursor”?

For v8 (try it!):

img = lv.img(lv.scr_act())
img.set_src(lv.SYMBOL.OK)
lv.indev_t.get_next(None).set_cursor(img)

For v7 (try it!):

img = lv.img(lv.scr_act(), None)
img.set_src(lv.SYMBOL.OK)
lv.indev_t.get_next(None).set_cursor(img)
1 Like

TypeError: argument has wrong type

for v7 in line 3
v7.10 KO , v7.11 (simulator) OK == bad choice !

#one trick ?
Thank’s

Updated links to online simulator:

v7:
https://sim.lvgl.io/v7/micropython/ports/javascript/bundle_out/index.html?script_direct=514dd6ba06fe3827ff7f651357ea198874ca6501

v8:
https://sim.lvgl.io/v8.1/micropython/ports/javascript/index.html?script_direct=2cea10668a0b15820165d564b2e13aa11681a7aa

@picpic020960 Do you still see a problem?