The latest development version of this page may be more current than this released 4.0.0 version.

zephyr,lvgl-keypad-input

Vendor: Zephyr-specific binding

Note

An implementation of a driver matching this compatible is available in modules/lvgl/input/lvgl_keypad_input.c.

Description

LVGL keypad indev pseudo-device

Listens for input events and routes the
lv_indev_data_t to the underlying keypad lv_indev_t managed by LVGL.

The property input-codes can be used to setup a mapping of input codes
to the lvgl keys. There are lvgl keys that have a special function:
https://docs.lvgl.io/master/overview/indev.html#keys.

The pseudo device can be associated to a specific device to listen only
for events from that device. Example configuration:

#include <zephyr/dt-bindings/lvgl/lvgl.h>

keypad {
        compatible = "zephyr,lvgl-keypad-input";
        input = <&buttons>;
        input-codes = <INPUT_KEY_1 INPUT_KEY_2>;
        lvgl-codes = <LV_KEY_NEXT LV_KEY_PREV>;
};

Properties

Properties not inherited from the base binding file.

Name

Type

Details

input-codes

array

Array of input event key codes (INPUT_KEY_* or INPUT_BTN_*).

This property is required.

lvgl-codes

array

Array of mapped lvgl keys.

This property is required.

input

phandle

Input device phandle.