Szia Gabor Hello
I am currently working on a source code based on lvgl 5.3. I don’t want to rebuild everything, too much work! I have a few problems with the keyboard and several text areas. I have a working solution for lvgl 6.0 in my original source, but it doesn’t work with 5.3, no events but actions.
Is it still possible to get the LVGL documentation 5.3? Or can you help me get this working again?
Old working Code LVGL6.0:
static lv_obj_t* kb;
static lv_obj_t* ta1;
static lv_obj_t* ta2;
static void kb_event_cb(lv_obj_t* event_kb, lv_event_t event)
{
// Just call the regular event handler
lv_kb_def_event_cb(event_kb, event);
}
static void ta_event_cb(lv_obj_t* ta, lv_event_t event)
{
if (event == LV_EVENT_CLICKED) {
// Focus on the clicked text area
if (kb != NULL)
lv_kb_set_ta(kb, ta);
}
}
In Function each TA:
lv_obj_set_event_cb(ta1, ta_event_cb);//Event Fensterwechsel
lv_obj_set_event_cb(ta2, ta_event_cb);//Event Fensterwechsel
and Keyboard static:
//Tastatur erstellen neu mit Fenster wechsel
kb = lv_kb_create(win, NULL);
lv_obj_set_size(kb, 1080, 300);
lv_obj_set_pos(kb, 100, 340);
lv_obj_set_event_cb(kb, kb_event_cb); // Setting a custom event handler stops the keyboard from closing automatically
lv_kb_set_ta(kb, ta1);// Focus it on one of the text areas to start
lv_kb_set_cursor_manage(kb, true);// Automatically show/hide cursors on text areas
I tried various things with the lv_kb_def_action, but it was unsuccessful. Only the first TA is active and I can write, but jumping to others doesn’t work. I cannot use the lv_kb_def_action from the lv_kb.c, it is not recognized. If more information is required, just ask. Many thanks. Üdvözlet!