forked from kofal.net/zmk
feat(sticky keys): initial implementation
This commit is contained in:
committed by
Pete Johanson
parent
bee45f9b3a
commit
76a6d7b4c5
@@ -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>
|
||||
|
||||
26
app/dts/behaviors/sticky_key.dtsi
Normal file
26
app/dts/behaviors/sticky_key.dtsi
Normal 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>;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
15
app/dts/bindings/behaviors/zmk,behavior-sticky-key.yaml
Normal file
15
app/dts/bindings/behaviors/zmk,behavior-sticky-key.yaml
Normal 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
|
||||
Reference in New Issue
Block a user