:orphan:
.. raw:: html
.. dtcompatible:: input-keymap
.. _dtbinding_input_keymap:
input-keymap
############
Vendor: :ref:`Generic or vendor-independent `
.. note::
An implementation of a driver matching this compatible is available in
:zephyr_file:`subsys/input/input_keymap.c`.
Description
***********
.. code-block:: none
Row-column to key mapper
Listens for row-column events from the parent device and reports key events.
Example configuration:
#include
#include
kbd {
...
keymap {
compatible = "input-keymap";
keymap = <
MATRIX_KEY(0, 0, INPUT_KEY_1)
MATRIX_KEY(0, 1, INPUT_KEY_2)
MATRIX_KEY(0, 2, INPUT_KEY_3)
MATRIX_KEY(1, 0, INPUT_KEY_4)
MATRIX_KEY(1, 1, INPUT_KEY_5)
MATRIX_KEY(1, 2, INPUT_KEY_6)
MATRIX_KEY(2, 0, INPUT_KEY_7)
MATRIX_KEY(2, 1, INPUT_KEY_8)
MATRIX_KEY(2, 2, INPUT_KEY_9)
>;
row-size = <3>;
col-size = <3>;
};
};
Properties
**********
.. tabs::
.. group-tab:: Node specific properties
Properties not inherited from the base binding file.
.. list-table::
:widths: 1 1 4
:header-rows: 1
* - Name
- Type
- Details
* - ``keymap``
- ``array``
- .. code-block:: none
List of codes, using the MATRIX_KEY() macro.
This property is **required**.
* - ``row-size``
- ``int``
- .. code-block:: none
The number of rows in the keymap.
This property is **required**.
* - ``col-size``
- ``int``
- .. code-block:: none
The number of columns in the keymap.
This property is **required**.
.. group-tab:: Deprecated node specific properties
Deprecated properties not inherited from the base binding file.
(None)
.. group-tab:: Base properties
Properties inherited from the base binding file, which defines
common properties that may be set on many nodes. Not all of these
may apply to the "input-keymap" compatible.
(None)