23ecf08119
Removed the label property from built-in behaviors, custom behaviors defined in a few keymaps, and macros generated with ZMK_MACRO(). Now that node names are used to identify behaviors, and names only need to be unique within the set of behaviors, the names of all behaviors have been shortened to be similar to their original labels. This means that any keymaps which reference behavior nodes by name instead of by label will need to be updated. Keymaps typically use the labels though, so most keymaps should be unaffected by this change.
82 lines
1.9 KiB
Plaintext
82 lines
1.9 KiB
Plaintext
/*
|
|
* Copyright (c) 2022 The ZMK Contributors
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#define MACRO_PLACEHOLDER 0
|
|
#define ZMK_MACRO(name,...) \
|
|
name: name { \
|
|
compatible = "zmk,behavior-macro"; \
|
|
#binding-cells = <0>; \
|
|
__VA_ARGS__ \
|
|
};
|
|
|
|
#define ZMK_MACRO1(name,...) \
|
|
name: name { \
|
|
compatible = "zmk,behavior-macro-one-param"; \
|
|
#binding-cells = <1>; \
|
|
__VA_ARGS__ \
|
|
};
|
|
|
|
#define ZMK_MACRO2(name,...) \
|
|
name: name { \
|
|
compatible = "zmk,behavior-macro-two-param"; \
|
|
#binding-cells = <2>; \
|
|
__VA_ARGS__ \
|
|
};
|
|
|
|
/ {
|
|
behaviors {
|
|
macro_tap: macro_tap {
|
|
compatible = "zmk,macro-control-mode-tap";
|
|
#binding-cells = <0>;
|
|
};
|
|
|
|
macro_press: macro_press {
|
|
compatible = "zmk,macro-control-mode-press";
|
|
#binding-cells = <0>;
|
|
};
|
|
|
|
macro_release: macro_release {
|
|
compatible = "zmk,macro-control-mode-release";
|
|
#binding-cells = <0>;
|
|
};
|
|
|
|
macro_tap_time: macro_tap_time {
|
|
compatible = "zmk,macro-control-tap-time";
|
|
#binding-cells = <1>;
|
|
};
|
|
|
|
macro_wait_time: macro_wait_time {
|
|
compatible = "zmk,macro-control-wait-time";
|
|
#binding-cells = <1>;
|
|
};
|
|
|
|
macro_pause_for_release: macro_pause_for_release {
|
|
compatible = "zmk,macro-pause-for-release";
|
|
#binding-cells = <0>;
|
|
};
|
|
|
|
macro_param_1to1: macro_param_1to1 {
|
|
compatible = "zmk,macro-param-1to1";
|
|
#binding-cells = <0>;
|
|
};
|
|
|
|
macro_param_1to2: macro_param_1to2 {
|
|
compatible = "zmk,macro-param-1to2";
|
|
#binding-cells = <0>;
|
|
};
|
|
|
|
macro_param_2to1: macro_param_2to1 {
|
|
compatible = "zmk,macro-param-2to1";
|
|
#binding-cells = <0>;
|
|
};
|
|
|
|
macro_param_2to2: macro_param_2to2 {
|
|
compatible = "zmk,macro-param-2to2";
|
|
#binding-cells = <0>;
|
|
};
|
|
};
|
|
};
|