How to select list by keypad

Description

i want to select list by keypad,would you give same guidance.

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

What LVGL version are you using?

What do you want to achieve?

What have you tried so far?

Code to reproduce

The code block(s) should be formatted like:

static bool keypad_callback(lv_indev_drv_t * indev_drv, lv_indev_data_t * data)
{
    u32 last_key = 0;
    /*Get whether the a key is pressed and save the pressed key*/
    Key_Num_t act_key = keypad_get_key();
    if(act_key != KEY_NONE)
    {
        data->state = LV_INDEV_STATE_PR;
        data->key=act_key;
        /*Translate the keys to LVGL control characters according to your key definitions*/
        switch(act_key)
        {
            case KEY_DOWN:
                act_key = LV_KEY_DOWN;
                break;
            case KEY_UP:
                act_key = LV_KEY_UP;
                break;
            case KEY_CANCEL:
                act_key = LV_KEY_END;
                break;
            case KEY_CONFIRM:
                act_key = LV_KEY_ENTER;
                break;
            case KEY_DELETE:
                act_key = LV_KEY_DEL;
                break;
            case KEY_POWER:
                act_key = LV_KEY_HOME;
                break;
            default:
                break;

        }

        last_key = act_key;
    }
    else
    {
        data->state = LV_INDEV_STATE_REL;
    }

    data->key = last_key;

    /*Return `false` because we are not buffering and no more data to read*/
    return false;
}

#if LV_USE_LIST
static void Trans_Type_handler(lv_obj_t* obj, lv_event_t event)
{
    u32 key=lark_kbd_read_buffer();
    if (event == LV_EVENT_KEY)
    {
        //printf("Clicked: %s\n", lv_list_get_btn_text(obj));
        TRACE(DBG_TRACE_LVL,"Clicked=%d\r\n",key);
    }

}
void disp_Transtype_list(void)
{
    g = lv_group_create();
    /*Create a list*/

    list = lv_list_create(lv_scr_act(), NULL);
    lv_obj_set_size(list, 310, 200);
    lv_obj_align(list, NULL, LV_ALIGN_CENTER, 0, 0);

    /*Add buttons to the list*/
    lv_obj_t* list_btn;
    list_btn = lv_list_add_btn(list, NULL, "1.PAYMENT");
    lv_obj_set_event_cb(list_btn, Trans_Type_handler);

    list_btn = lv_list_add_btn(list, NULL, "2.REFUND");
    lv_obj_set_event_cb(list_btn, Trans_Type_handler);

    list_btn = lv_list_add_btn(list, NULL, "3.INQUIRY");
    lv_obj_set_event_cb(list_btn, Trans_Type_handler);

    list_btn = lv_list_add_btn(list, NULL, "4.BALANCE");

    lv_obj_set_event_cb(list_btn, Trans_Type_handler);
    lv_group_add_obj(g, list_btn);
    lv_indev_set_group(indev_keypad, g);

}
#endif

Screenshot and/or video

if i selected one item,how to clear all obj .when press key_down or key_up,list items with color marked will be better.

I’m not familiar with this. Maybe you can find some clue from texarea source code.