Keypad input device, why LV_EVENT_LONG_PRESSED only on ENTER?

I was surprised to find LONGPRESSED does not work for keypad devices except for a single key (KEY_ENTER). I’m not the only one who noticed that it seems like an unwanted limitation. The documentation does not really indicate this limitation either.

I don’t see why it has to be this way, or that it should but perhaps I don’t understand all the use cases. Thoughts on whether this can change?

Here is the relevant code:

        if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > i->driver->long_press_time) {
            i->proc.long_pr_sent = 1;
            if(data->key == LV_KEY_ENTER) {
                i->proc.longpr_rep_timestamp = lv_tick_get();
                lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, indev_act);
                if(indev_reset_check(&i->proc)) return;
            }
        }

It’s because ENTER is mapped to the touchpad-like events (PRESS, CLICK, RELEASE etc). So ENTER acts as you clicked the widgets via touchpad. If we sent the same events on LV_KEY_LEFT the widget would think the they were normally clicked.

I think we could solve it by having new events like LV_EVENT_KEY_PRESS/RELEASE/LONG_PRESS etc.

Any news ?

Not yet, it can part of v9 (planned for Q3/Q4 this year).