Hi, I have a problem with the unix port.
My application has only a text area but the PC keyboard doesn’t work.
I just want to be able to type with the PC keyboard in the textarea.
Following the examples in https://github.com/lvgl/lv_binding_micropython/tree/master/examples I have added the display driver and the mouse driver.
But there isn’t the keyboard driver.
How do I add it?
The program I used:
import lvgl as lv
import SDL
lv.init()
SDL.init(w=320,h=240)
# Register SDL display driver
disp_buf1 = lv.disp_buf_t()
buf1_1 = bytearray(320*10)
disp_buf1.init(buf1_1, None, len(buf1_1) // lv.color_t.SIZE)
disp_drv = lv.disp_drv_t()
disp_drv.init()
disp_drv.buffer = disp_buf1
disp_drv.flush_cb = SDL.monitor_flush
disp_drv.hor_res = 320
disp_drv.ver_res = 240
disp_drv.register()
# Register SDL mouse driver
indev_drv = lv.indev_drv_t()
indev_drv.init()
indev_drv.type = lv.INDEV_TYPE.POINTER
indev_drv.read_cb = SDL.mouse_read
indev_drv.register()
scr = lv.scr_act()
lv.scr_load(scr)
ta = lv.textarea(scr)
ta.set_width(320)
ta.set_height(240)
while True:
pass