1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

add PRESS action handling to keypad indev

This commit is contained in:
Gabor Kiss-Vamosi 2018-12-05 06:42:37 +01:00
parent ccea31d3ab
commit 546262df38

View File

@ -368,6 +368,10 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data)
if(data->state == LV_INDEV_STATE_PR &&
i->proc.last_state == LV_INDEV_STATE_REL) {
i->proc.pr_timestamp = lv_tick_get();
lv_obj_t * focused = lv_group_get_focused(i->group);
if(focused) {
focused->signal_func(focused, LV_SIGNAL_PRESSED, indev_act);
}
}
/*Pressing*/
else if(data->state == LV_INDEV_STATE_PR && i->proc.last_state == LV_INDEV_STATE_PR) {