# Common Key Matrices on Matrix-connected Key Boards

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Input bindings_

> Device-tree binding reference for Common Key Matrices on Matrix-connected Key Boards.

<!-- SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -->


<a id="dt-root"></a>

**Schema identifier (<code>&#36;id</code>):** <span id="dt-09f478f44eb202ea573e"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;schemas&#47;input&#47;matrix&#45;keymap&#46;yaml&#35;&#34;</code></span>

**Schema dialect (<code>&#36;schema</code>):** <span id="dt-dcb375baab6014763a68"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;meta&#45;schemas&#47;core&#46;yaml&#35;&#34;</code></span>

<a id="dt-e46b5a5dd81dbd751c9f"></a>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Olof Johansson &#60;olof&#64;lixom&#46;net&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">A simple common binding for matrix-connected key boards. Currently targeted at
defining the keys in the scope of linux key codes since that is a stable and
standardized interface at this time.</p>
<p style="white-space: pre-wrap">Some users of this binding might choose to specify secondary keymaps for
cases where there is a modifier key such as a Fn key. Proposed names
for said properties are "linux,fn-keymap" or with another descriptive
word for the modifier other from "Fn".</p>
</div>

<a id="dt-e1f655ed0ff4d595dadc"></a>

## Properties and child nodes (<code>properties</code>)

<a id="dt-8c9c353c8c60bb4f347a"></a>

### <code>linux&#44;keymap</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-ba27b2d8bc052c39578e">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32&#45;array</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-03a03f95a666fe4b033c>)</span>

<div id="dt-abd464afc7d46cdb8be3">
<pre><code>An array of packed 1-cell entries containing the equivalent of row,
column and linux key-code. The 32-bit big endian cell is packed as:
    row &lt;&lt; 24 | column &lt;&lt; 16 | key-code</code></pre>
</div>

<a id="dt-9f88f93c79ab1e21f714"></a>

### <code>keypad&#44;num&#45;rows</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-7e4eb1ed751b83b1b6ae">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

<div id="dt-121d5035d7a977e720f5">
<p style="white-space: pre-wrap">Number of row lines connected to the keypad controller.</p>
</div>

<a id="dt-faa0871677b8f8b05d2a"></a>

### <code>keypad&#44;num&#45;columns</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-e89ea808b6a36e0d7c62">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

<div id="dt-7aebcc0d03c2f4897c31">
<p style="white-space: pre-wrap">Number of column lines connected to the keypad controller.</p>
</div>

<a id="dt-738c4b4f9e483441138b"></a>

## Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)

<code>true</code>

Allowed by this rule.

<a id="dt-1a130cabaa8a47b058bf"></a>

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">keypad {
    /* ... */
    linux,keymap = &lt; 0x00030012
                     0x0102003a &gt;;
    keypad,num-rows = &lt;2&gt;;
    keypad,num-columns = &lt;8&gt;;
};
</code></pre>

## Source notes

<details>
<summary>Annotations retained from the schema source</summary>

<p id="dt-comment-0"><strong>Line 1:</strong> <span> SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)</span></p>

</details>
