1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

Merge pull request #1661 from tehkillerbee/master

Handle LV_EVENT_CANCEL in list/group
This commit is contained in:
Gabor Kiss-Vamosi 2020-07-14 13:37:10 +02:00 committed by GitHub
commit 2f33670b4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -767,6 +767,11 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param)
if(btn) lv_list_focus_btn(list, btn);
}
}
else if(c == LV_KEY_ESC) {
lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
/* Handle ESC/Cancel event */
res = lv_event_send(ext->act_sel_btn, LV_EVENT_CANCEL, NULL);
}
#endif
}
return res;