aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/dts
diff options
context:
space:
mode:
authorJonathan Rascher <[email protected]>2021-06-09 18:51:28 -0500
committerPete Johanson <[email protected]>2021-11-15 05:49:23 -0500
commite9140b2da914ee121e7f40eaeb8c6cf827d03622 (patch)
tree483b9f93035a4a7f393d753c63bd1c2b215598e1 /app/dts
parentf8018b22d0bcba97e54652a01e8bdefb15f83c4c (diff)
downloadzmk-e9140b2da914ee121e7f40eaeb8c6cf827d03622.tar.gz
zmk-e9140b2da914ee121e7f40eaeb8c6cf827d03622.zip
feat(conditional-layers): Implement feature
This is a generalization of the existing concept of tri-layer support that's already well known. Essentially, a conditional-layer configuration activates a particular layer (the then-layer) when one or more other layers (the if-layers) are activated. This is commonly used on ortho keyboards to activate a third "adjust" layer while the primary two layers ("lower" and "raise") are active.
Diffstat (limited to 'app/dts')
-rw-r--r--app/dts/bindings/zmk,conditional-layers.yaml17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/dts/bindings/zmk,conditional-layers.yaml b/app/dts/bindings/zmk,conditional-layers.yaml
new file mode 100644
index 0000000000..7e79038ea3
--- /dev/null
+++ b/app/dts/bindings/zmk,conditional-layers.yaml
@@ -0,0 +1,17 @@
+# Copyright (c) 2021 The ZMK Contributors
+# SPDX-License-Identifier: MIT
+
+description: Conditional layers allow layer combinations to trigger additional layers
+
+compatible: "zmk,conditional-layers"
+
+child-binding:
+ description: "Single conditional layer that activates then-layer when if-layers are active"
+
+ properties:
+ if-layers:
+ type: array
+ required: true
+ then-layer:
+ type: int
+ required: true