0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/input/matrix-keymap.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Common key matrices binding for matrix-connected key boards
0008
0009 maintainers:
0010 - Olof Johansson <olof@lixom.net>
0011
0012 description: |
0013 A simple common binding for matrix-connected key boards. Currently targeted at
0014 defining the keys in the scope of linux key codes since that is a stable and
0015 standardized interface at this time.
0016
0017 Some users of this binding might choose to specify secondary keymaps for
0018 cases where there is a modifier key such as a Fn key. Proposed names
0019 for said properties are "linux,fn-keymap" or with another descriptive
0020 word for the modifier other from "Fn".
0021
0022 properties:
0023 linux,keymap:
0024 $ref: '/schemas/types.yaml#/definitions/uint32-array'
0025 description: |
0026 An array of packed 1-cell entries containing the equivalent of row,
0027 column and linux key-code. The 32-bit big endian cell is packed as:
0028 row << 24 | column << 16 | key-code
0029
0030 keypad,num-rows:
0031 $ref: /schemas/types.yaml#/definitions/uint32
0032 description: Number of row lines connected to the keypad controller.
0033
0034 keypad,num-columns:
0035 $ref: /schemas/types.yaml#/definitions/uint32
0036 description: Number of column lines connected to the keypad controller.
0037
0038 additionalProperties: true
0039
0040 examples:
0041 - |
0042 keypad {
0043 /* ... */
0044 linux,keymap = < 0x00030012
0045 0x0102003a >;
0046 keypad,num-rows = <2>;
0047 keypad,num-columns = <8>;
0048 };