Hello. I am trying to edit textarea value with rotary encoder.
Text area have cb function:
lv_obj_add_event_cb(time_offset_value, ta_event_cb, LV_EVENT_ALL, NULL);
In my CB function I try to get event from rotary encoder:
static void ta_event_cb(lv_event_t * e)
{
lv_obj_t * ta = lv_event_get_target_obj(e);
lv_event_code_t code = lv_event_get_code(e);
if(code == LV_EVENT_KEY){
uint32_t key = lv_indev_get_key(lv_indev_active());
int32_t rotary = lv_event_get_rotary_diff(e);
DEBUG("GET KEY: %d %d %i",code,key,rotary);
}
if(code == LV_EVENT_ROTARY){
DEBUG("!!!===>>> ROTARY <====");
}
}
But LV_EVENT_ROTARY never come.
In LV_EVENT_KEY key variable value and rotary variable value always 0.
My input device works, it move cursor inside textarea and I have log messages:
[Info] (15.295, +210) indev_encoder_proc: rotated by +1 (edit) lv_indev.c:1060
How can i get this event (rotated +1 and -1) to change the value of textarea, instead of moving cursor?