diff options
author | KemoNine <mcrosson@users.noreply.github.com> | 2020-12-29 11:57:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-29 11:57:49 -0500 |
commit | d207c3c30f7f2d0648b32d59f481498fe048230c (patch) | |
tree | 885efa8c436c58fca8a5c39a952898f36d3da4e4 /app/dts | |
parent | 43f6d798be70ef247b0717730ec34202cb81e96d (diff) |
(feature) Add &to keycode/behavior (#489)
feat(behaviors): Add `&to` behavior to switch to a layer.
Diffstat (limited to 'app/dts')
-rw-r--r-- | app/dts/behaviors.dtsi | 1 | ||||
-rw-r--r-- | app/dts/behaviors/to_layer.dtsi | 15 | ||||
-rw-r--r-- | app/dts/bindings/behaviors/zmk,behavior-to-layer.yaml | 8 |
3 files changed, 24 insertions, 0 deletions
diff --git a/app/dts/behaviors.dtsi b/app/dts/behaviors.dtsi index 9a64fc6..daa073f 100644 --- a/app/dts/behaviors.dtsi +++ b/app/dts/behaviors.dtsi @@ -6,6 +6,7 @@ #include <behaviors/sticky_key.dtsi> #include <behaviors/momentary_layer.dtsi> #include <behaviors/toggle_layer.dtsi> +#include <behaviors/to_layer.dtsi> #include <behaviors/reset.dtsi> #include <behaviors/sensor_rotate_key_press.dtsi> #include <behaviors/rgb_underglow.dtsi> diff --git a/app/dts/behaviors/to_layer.dtsi b/app/dts/behaviors/to_layer.dtsi new file mode 100644 index 0000000..b09616f --- /dev/null +++ b/app/dts/behaviors/to_layer.dtsi @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/ { + behaviors { + to: behavior_to_layer { + compatible = "zmk,behavior-to-layer"; + label = "TO_LAYER"; + #binding-cells = <1>; + }; + }; +}; diff --git a/app/dts/bindings/behaviors/zmk,behavior-to-layer.yaml b/app/dts/bindings/behaviors/zmk,behavior-to-layer.yaml new file mode 100644 index 0000000..cbafddf --- /dev/null +++ b/app/dts/bindings/behaviors/zmk,behavior-to-layer.yaml @@ -0,0 +1,8 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: To Layer + +compatible: "zmk,behavior-to-layer" + +include: one_param.yaml |