feat(sticky keys): initial implementation

This commit is contained in:
Okke Formsma
2020-11-11 22:09:08 +01:00
committed by Pete Johanson
parent bee45f9b3a
commit 76a6d7b4c5
27 changed files with 467 additions and 0 deletions

View File

@@ -3,6 +3,7 @@
#include <behaviors/none.dtsi>
#include <behaviors/mod_tap.dtsi>
#include <behaviors/layer_tap.dtsi>
#include <behaviors/sticky_key.dtsi>
#include <behaviors/momentary_layer.dtsi>
#include <behaviors/toggle_layer.dtsi>
#include <behaviors/reset.dtsi>

View File

@@ -0,0 +1,26 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
/ {
behaviors {
sk: behavior_sticky_key {
compatible = "zmk,behavior-sticky-key";
label = "STICKY_KEY";
#binding-cells = <1>;
release-after-ms = <1000>;
bindings = <&kp>;
};
sl: behavior_sticky_layer {
compatible = "zmk,behavior-sticky-key";
label = "STICKY_LAYER";
#binding-cells = <1>;
release-after-ms = <1000>;
bindings = <&mo>;
};
};
};

View File

@@ -0,0 +1,15 @@
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
description: Sticky key behavior
compatible: "zmk,behavior-sticky-key"
include: one_param.yaml
properties:
bindings:
type: phandles
required: true
release-after-ms:
type: int