lvgl / lv_binding_micropython

LVGL binding for MicroPython
MIT License
250 stars 161 forks source link

Rewrite sdl keyboard_handler to return SDL key and release state #236

Closed daviel closed 1 year ago

daviel commented 2 years ago

Doing it this way made it possible to find out the release state of one or multiple keys. Also you can add listeners for keys beside the LVGL ones by using the SDL-key-constants.

For whatever reason as soon as I add a group to retrieve events from widgets there is still fired a LV_INDEV_STATE_RELEASED immediately after a LV_INDEV_STATE_PRESSED event. Maybe there is some issue in the way events are handled in the LVGL core? In think that indev_keypad_proc in lv_indev.c may be the reason.

Let me know what you think. Maybe I misunderstood something in the LVGL implementation.

amirgon commented 1 year ago

Micropython bindings removed this driver and now uses LVGL built-in SDL driver.
Any change to SDL driver should be done on the LVGL SDL driver.