How to finish hid keyboard port?


  When I press a key of the HID keyboard, how do I display the value in the textarea? 

Where should I call lv_textarea_add_char?

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


What LVGL version are you using?


What do you want to achieve?

Just like a soft keyboard, it’s easy to enter

What have you tried so far?

The textarea has been focused. and I press one key of HID keyboard. The soft keyboard is displayed.

in function keypad_read,I have got the HID keyboard value 。
At this point, shouldn’t it be over?

But i don’t see the textarea update.

Is there anything else I need to do?

Code to reproduce

static bool keypad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data)

static uint32_t last_key = 0;

    data->state = LV_INDEV_STATE_PR;
     last_key  = mykey;

   enterKey = false;

data->state = LV_INDEV_STATE_REL;


data->key = last_key;
return false;

Eensure that the textarea is part of a group, and that the keyboard indev is also attached to that group.