forked from kofal.net/zmk
(feature) Add &to keycode/behavior (#489)
feat(behaviors): Add `&to` behavior to switch to a layer.
This commit is contained in:
@@ -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>
|
||||
|
||||
15
app/dts/behaviors/to_layer.dtsi
Normal file
15
app/dts/behaviors/to_layer.dtsi
Normal file
@@ -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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
8
app/dts/bindings/behaviors/zmk,behavior-to-layer.yaml
Normal file
8
app/dts/bindings/behaviors/zmk,behavior-to-layer.yaml
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user