diff --git a/samples/subsys/display/lvgl/boards/native_posix.overlay b/samples/subsys/display/lvgl/boards/native_posix.overlay index 7610c48fe60..78e05578be6 100644 --- a/samples/subsys/display/lvgl/boards/native_posix.overlay +++ b/samples/subsys/display/lvgl/boards/native_posix.overlay @@ -11,13 +11,18 @@ sw0 = &button0; }; - keys { + keys: keys { compatible = "gpio-keys"; button0: button0 { /* gpio0 pin 0 is already aliased to led0 */ gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; zephyr,code = ; }; + + button1: button1 { + gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; + zephyr,code = ; + }; }; lvgl_pointer_input { @@ -25,15 +30,22 @@ compatible = "zephyr,lvgl-pointer-input"; input = <&input_sdl_touch>; }; + + lvgl_button_input { + compatible = "zephyr,lvgl-button-input"; + input = <&keys>; + input-codes = ; + coordinates = <160 120>; + }; }; &gpio0 { - ngpios = <2>; + ngpios = <3>; sdl_gpio { status = "okay"; compatible = "zephyr,gpio-emul-sdl"; /* Skip pin 0 with the unknown code 0 */ - scancodes = <0 21>; + scancodes = <0 21 5>; }; };