I am currently working on a project for Raspberry Pi and am using the Micropython LVGL port with SDL. I am trying to implement some global key event listeners which would trigger when a key is pressed independent from the current view.
I could successfully use the feedback_cb for the indev_drv but I am encountering following issue:
- I can’t really figuring out how to get a key_released event in micropython with SDL.keyboard_read (trying to retrieve event_data or casting the blob gives me the same event type)
- I am not sure what would be the best way to implement the listener in a way so I can trigger something pressing 2 keys at the same time
I saw in the docs that there is a way to achieve this by implementing the key callback method yourself (and using continue_read) but I am not happy to move away from the SDL.keyboard_read method.
I am very grateful for any help regarding this. I want to stay as vanilla LVGL as possible but am open for any idea.