* Use defines to keep either all behaviors with omits, or selective behaviors with explicit kept behavior, before including `behavior.dtsi` in keymaps. * Default ZMK_BEHAVIORS_KEEP_ALL when building with the studio RPC endpoint snippet.
36 lines
809 B
Text
36 lines
809 B
Text
/*
|
|
* Copyright (c) 2020 The ZMK Contributors
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#include <dt-bindings/zmk/behaviors.h>
|
|
|
|
/ {
|
|
behaviors {
|
|
#if ZMK_BEHAVIOR_OMIT(SK)
|
|
/omit-if-no-ref/
|
|
#endif
|
|
sk: sticky_key {
|
|
compatible = "zmk,behavior-sticky-key";
|
|
#binding-cells = <1>;
|
|
release-after-ms = <1000>;
|
|
bindings = <&kp>;
|
|
ignore-modifiers;
|
|
display-name = "Sticky Key";
|
|
};
|
|
#if ZMK_BEHAVIOR_OMIT(STICKY_LAYER)
|
|
/omit-if-no-ref/
|
|
#endif
|
|
sl: sticky_layer {
|
|
compatible = "zmk,behavior-sticky-key";
|
|
#binding-cells = <1>;
|
|
release-after-ms = <1000>;
|
|
bindings = <&mo>;
|
|
quick-release;
|
|
display-name = "Sticky Layer";
|
|
};
|
|
};
|
|
|
|
};
|
|
|