How to get Long Press Event While Read Callback set the state to LV_INDEV_STATE_RELEASED

Description

Hi
I’m using Slider with both value changed and long pressed Event. But the problem is in read callback it gets LV_INDEV_STATE_RELEASED state periodically. how to change the read callback to solve this problem. Actually I want to use Long Press of the Up & Down Button for Greater Increments Steps on Slider. by Pressing and holding it, it increments in 10 steps instead of 1 step per button press. beside this is there any other way that can implement this functionality?

What MCU/Processor/Board and compiler are you using?

Stm32f769igt6

What LVGL version are you using?

8.2

What do you want to achieve?

Getting Long Press Event on Slider Up and Down Button. Finally Use that event for moving Slider Faster than one Step per button Press.

What have you tried so far?

even by Commenting the data->state = LV_INDEV_STATE_RELEASED; It didn’t get the Long Press Event.

Code to reproduce

void Key_read_cb(lv_indev_drv_t * drv, lv_indev_data_t *data){

if(DOWN_B_F){

	DOWN_B_F = false;
	if(navigate_mode_f){

		lv_group_focus_prev(g);
	}
	else{

		data->key = LV_KEY_LEFT;
		lv_group_set_editing(g,true);
	}

	data->state = LV_INDEV_STATE_PRESSED;

}else if(UP_B_F){

	UP_B_F = false;
	if(navigate_mode_f){

		lv_group_focus_next(g);
	}
	else{

		data->key = LV_KEY_RIGHT;
		lv_group_set_editing(g,true);
	}

	data->state = LV_INDEV_STATE_PRESSED;

}else if(OK_B_F){

	OK_B_F = false;
	data->key = LV_KEY_ENTER;
	data->state = LV_INDEV_STATE_PRESSED;

}else{

	data->state = LV_INDEV_STATE_RELEASED;
}

}

lv_obj_add_event_cb(ui_GeneratorNomPowSlider, ui_event_GeneratorNomPowSlider, LV_EVENT_ALL, NULL);

void ui_event_GeneratorNomPowSlider(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
lv_obj_t * target = lv_event_get_target(e);
if(event_code == LV_EVENT_LONG_PRESSED) {
GeneratorNomPowS_LPress(e);
}
// }else if(event_code == LV_EVENT_VALUE_CHANGED) {
// GeneratorNomPowS_VCH(e);
// }
}

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.