1# Copyright 2024 Google LLC 2# SPDX-License-Identifier: Apache-2.0 3 4description: | 5 Row-column to key mapper 6 7 Listens for row-column events from the parent device and reports key events. 8 9 Example configuration: 10 11 #include <zephyr/dt-bindings/input/input-event-codes.h> 12 #include <zephyr/dt-bindings/input/keymap.h> 13 14 kbd { 15 ... 16 keymap { 17 compatible = "input-keymap"; 18 keymap = < 19 MATRIX_KEY(0, 0, INPUT_KEY_1) 20 MATRIX_KEY(0, 1, INPUT_KEY_2) 21 MATRIX_KEY(0, 2, INPUT_KEY_3) 22 MATRIX_KEY(1, 0, INPUT_KEY_4) 23 MATRIX_KEY(1, 1, INPUT_KEY_5) 24 MATRIX_KEY(1, 2, INPUT_KEY_6) 25 MATRIX_KEY(2, 0, INPUT_KEY_7) 26 MATRIX_KEY(2, 1, INPUT_KEY_8) 27 MATRIX_KEY(2, 2, INPUT_KEY_9) 28 >; 29 row-size = <3>; 30 col-size = <3>; 31 }; 32 }; 33 34compatible: "input-keymap" 35 36properties: 37 keymap: 38 type: array 39 required: true 40 description: | 41 List of codes, using the MATRIX_KEY() macro. 42 43 row-size: 44 type: int 45 required: true 46 description: | 47 The number of rows in the keymap. 48 49 col-size: 50 type: int 51 required: true 52 description: | 53 The number of columns in the keymap. 54