forked from kofal.net/zmk
feat: Add keyboard physical layout system.
* Add bindings to allow creating multiple physical layouts that specify their key's physical attributes, and the matching matrix transform and dependant kscan to use. * Synthesize a basic physical layout if none specified, for backwards compatibility. * Update matrix transform API to explicitly pass in the selected transform to the API instead of using a fixed chosen transform. * Move kscan subscription and handling into the physical layout code, so that selecting a different physical layout at runtime can also use the correct kscan instance. * Add `physical_layouts.dtsi` file to include so you can use the pre-configured `&key_physical_attrs` for adding you layout keys.
This commit is contained in:
committed by
Pete Johanson
parent
80173f8ea3
commit
c5cca5b34f
23
app/dts/bindings/zmk,physical-layout-position-map.yaml
Normal file
23
app/dts/bindings/zmk,physical-layout-position-map.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2024 The ZMK Contributors
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
description: |
|
||||
Describes how to correlate equivalent keys between layouts that don't have the exact same X,Y location.
|
||||
|
||||
compatible: "zmk,physical-layout-position-map"
|
||||
|
||||
properties:
|
||||
complete:
|
||||
type: boolean
|
||||
description: If the mapping complete describes the key mapping, and no position based mapping should be used.
|
||||
|
||||
child-binding:
|
||||
properties:
|
||||
physical-layout:
|
||||
type: phandle
|
||||
description: The physical layout that corresponds to this mapping entry.
|
||||
positions:
|
||||
type: array
|
||||
description: Array of key positions that match the same array entry in the other sibling nodes.
|
||||
Reference in New Issue
Block a user