1.. zephyr:code-sample:: draw_touch_events
2   :name: Draw touch events
3   :relevant-api: input_events display_interface
4
5   Visualize touch events on a display.
6
7Overview
8********
9This sample will draw a small plus in the last touched coordinates, that way you can check
10if the touch screen works for a board, examine its parameters such as inverted/swapped axes.
11
12Building and Running
13********************
14While this is a generic sample and it should work with any boards with both display controllers
15and touch controllers supported by Zephyr (provided the corresponding ``/chosen node`` properties
16are set i.e. ``zephyr,touch`` and ``zephyr,display``).
17Below is an example on how to build the sample for :zephyr:board:`stm32f746g_disco`:
18
19.. zephyr-app-commands::
20   :zephyr-app: samples/subsys/input/draw_touch_events
21   :board: stm32f746g_disco
22   :goals: build
23   :compact:
24
25For testing purposes without the need of any hardware, the :ref:`native_sim <native_sim>`
26board is also supported and can be built as follows:
27
28.. zephyr-app-commands::
29   :zephyr-app: samples/subsys/input/draw_touch_events
30   :board: native_sim
31   :goals: build
32   :compact:
33