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.
This commit is contained in:
Jonathan Rascher
2021-06-09 18:51:28 -05:00
committed by Pete Johanson
parent f8018b22d0
commit e9140b2da9
3 changed files with 109 additions and 0 deletions

View File

@@ -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