aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/dts
diff options
context:
space:
mode:
authorJoel Spadin <[email protected]>2023-11-18 00:47:01 -0600
committerJoel Spadin <[email protected]>2023-12-04 20:06:54 -0600
commit23ecf081192959f66f5cc064ed81c69f2988e3e7 (patch)
tree3895558921b05ddd8bd9e2df5cda6c257b21b87d /app/dts
parent36eda571b77fb03e0af51caf4f5f1d2c7d43b3d5 (diff)
downloadzmk-23ecf081192959f66f5cc064ed81c69f2988e3e7.tar.gz
zmk-23ecf081192959f66f5cc064ed81c69f2988e3e7.zip
refactor(behaviors)!: Remove labels from behaviors
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.
Diffstat (limited to 'app/dts')
-rw-r--r--app/dts/behaviors/backlight.dtsi4
-rw-r--r--app/dts/behaviors/bluetooth.dtsi3
-rw-r--r--app/dts/behaviors/caps_word.dtsi3
-rw-r--r--app/dts/behaviors/ext_power.dtsi4
-rw-r--r--app/dts/behaviors/gresc.dtsi1
-rw-r--r--app/dts/behaviors/key_press.dtsi3
-rw-r--r--app/dts/behaviors/key_repeat.dtsi3
-rw-r--r--app/dts/behaviors/key_toggle.dtsi3
-rw-r--r--app/dts/behaviors/layer_tap.dtsi3
-rw-r--r--app/dts/behaviors/macros.dtsi24
-rw-r--r--app/dts/behaviors/mod_tap.dtsi3
-rw-r--r--app/dts/behaviors/momentary_layer.dtsi3
-rw-r--r--app/dts/behaviors/none.dtsi3
-rw-r--r--app/dts/behaviors/outputs.dtsi3
-rw-r--r--app/dts/behaviors/reset.dtsi8
-rw-r--r--app/dts/behaviors/rgb_underglow.dtsi4
-rw-r--r--app/dts/behaviors/sensor_rotate_key_press.dtsi3
-rw-r--r--app/dts/behaviors/sticky_key.dtsi6
-rw-r--r--app/dts/behaviors/to_layer.dtsi3
-rw-r--r--app/dts/behaviors/toggle_layer.dtsi3
-rw-r--r--app/dts/behaviors/transparent.dtsi3
21 files changed, 31 insertions, 62 deletions
diff --git a/app/dts/behaviors/backlight.dtsi b/app/dts/behaviors/backlight.dtsi
index bebd6dfbf5..54c83ff44c 100644
--- a/app/dts/behaviors/backlight.dtsi
+++ b/app/dts/behaviors/backlight.dtsi
@@ -6,9 +6,9 @@
/ {
behaviors {
- /omit-if-no-ref/ bl: behavior_backlight {
+ // Behavior can be invoked on peripherals, so name must be <= 8 characters.
+ /omit-if-no-ref/ bl: bcklight {
compatible = "zmk,behavior-backlight";
- label = "BCKLGHT";
#binding-cells = <2>;
};
};
diff --git a/app/dts/behaviors/bluetooth.dtsi b/app/dts/behaviors/bluetooth.dtsi
index a49ff4d6f3..40557b7a28 100644
--- a/app/dts/behaviors/bluetooth.dtsi
+++ b/app/dts/behaviors/bluetooth.dtsi
@@ -6,9 +6,8 @@
/ {
behaviors {
- /omit-if-no-ref/ bt: behavior_bluetooth {
+ /omit-if-no-ref/ bt: bluetooth {
compatible = "zmk,behavior-bluetooth";
- label = "BLUETOOTH";
#binding-cells = <2>;
};
};
diff --git a/app/dts/behaviors/caps_word.dtsi b/app/dts/behaviors/caps_word.dtsi
index 219300dc28..795fbc0843 100644
--- a/app/dts/behaviors/caps_word.dtsi
+++ b/app/dts/behaviors/caps_word.dtsi
@@ -8,9 +8,8 @@
/ {
behaviors {
- /omit-if-no-ref/ caps_word: behavior_caps_word {
+ /omit-if-no-ref/ caps_word: caps_word {
compatible = "zmk,behavior-caps-word";
- label = "CAPS_WORD";
#binding-cells = <0>;
continue-list = <UNDERSCORE BACKSPACE DELETE>;
};
diff --git a/app/dts/behaviors/ext_power.dtsi b/app/dts/behaviors/ext_power.dtsi
index f61170dd5f..2ae1daf84a 100644
--- a/app/dts/behaviors/ext_power.dtsi
+++ b/app/dts/behaviors/ext_power.dtsi
@@ -6,9 +6,9 @@
/ {
behaviors {
- ext_power: behavior_ext_power {
+ // Behavior can be invoked on peripherals, so name must be <= 8 characters.
+ ext_power: extpower {
compatible = "zmk,behavior-ext-power";
- label = "EXTPOWER";
#binding-cells = <1>;
};
};
diff --git a/app/dts/behaviors/gresc.dtsi b/app/dts/behaviors/gresc.dtsi
index fa4c685b7d..59a7329178 100644
--- a/app/dts/behaviors/gresc.dtsi
+++ b/app/dts/behaviors/gresc.dtsi
@@ -10,7 +10,6 @@
behaviors {
/omit-if-no-ref/ gresc: grave_escape {
compatible = "zmk,behavior-mod-morph";
- label = "GRAVE_ESCAPE";
#binding-cells = <0>;
bindings = <&kp ESC>, <&kp GRAVE>;
mods = <(MOD_LGUI|MOD_LSFT|MOD_RGUI|MOD_RSFT)>;
diff --git a/app/dts/behaviors/key_press.dtsi b/app/dts/behaviors/key_press.dtsi
index b0fc2db101..ddaf7eed37 100644
--- a/app/dts/behaviors/key_press.dtsi
+++ b/app/dts/behaviors/key_press.dtsi
@@ -7,9 +7,8 @@
/ {
behaviors {
/* DEPRECATED: `cp` will be removed in the future */
- /omit-if-no-ref/ cp: kp: behavior_key_press {
+ /omit-if-no-ref/ cp: kp: key_press {
compatible = "zmk,behavior-key-press";
- label = "KEY_PRESS";
#binding-cells = <1>;
};
};
diff --git a/app/dts/behaviors/key_repeat.dtsi b/app/dts/behaviors/key_repeat.dtsi
index 795a77f621..88910f6271 100644
--- a/app/dts/behaviors/key_repeat.dtsi
+++ b/app/dts/behaviors/key_repeat.dtsi
@@ -8,9 +8,8 @@
/ {
behaviors {
- /omit-if-no-ref/ key_repeat: behavior_key_repeat {
+ /omit-if-no-ref/ key_repeat: key_repeat {
compatible = "zmk,behavior-key-repeat";
- label = "KEY_REPEAT";
#binding-cells = <0>;
usage-pages = <HID_USAGE_KEY>;
};
diff --git a/app/dts/behaviors/key_toggle.dtsi b/app/dts/behaviors/key_toggle.dtsi
index df581014e0..a3e3f36f27 100644
--- a/app/dts/behaviors/key_toggle.dtsi
+++ b/app/dts/behaviors/key_toggle.dtsi
@@ -6,9 +6,8 @@
/ {
behaviors {
- /omit-if-no-ref/ kt: behavior_key_toggle {
+ /omit-if-no-ref/ kt: key_toggle {
compatible = "zmk,behavior-key-toggle";
- label = "KEY_TOGGLE";
#binding-cells = <1>;
};
};
diff --git a/app/dts/behaviors/layer_tap.dtsi b/app/dts/behaviors/layer_tap.dtsi
index 1d92245c64..dc953e9358 100644
--- a/app/dts/behaviors/layer_tap.dtsi
+++ b/app/dts/behaviors/layer_tap.dtsi
@@ -6,9 +6,8 @@
/ {
behaviors {
- /omit-if-no-ref/ lt: behavior_layer_tap {
+ /omit-if-no-ref/ lt: layer_tap {
compatible = "zmk,behavior-hold-tap";
- label = "LAYER_TAP";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <200>;
diff --git a/app/dts/behaviors/macros.dtsi b/app/dts/behaviors/macros.dtsi
index 36b4a8d33f..44bc7ab777 100644
--- a/app/dts/behaviors/macros.dtsi
+++ b/app/dts/behaviors/macros.dtsi
@@ -5,10 +5,8 @@
*/
#define MACRO_PLACEHOLDER 0
-#define ZMK_MACRO_STRINGIFY(x) #x
#define ZMK_MACRO(name,...) \
name: name { \
- label = ZMK_MACRO_STRINGIFY(ZM_ ## name); \
compatible = "zmk,behavior-macro"; \
#binding-cells = <0>; \
__VA_ARGS__ \
@@ -16,7 +14,6 @@ name: name { \
#define ZMK_MACRO1(name,...) \
name: name { \
- label = ZMK_MACRO_STRINGIFY(ZM_ ## name); \
compatible = "zmk,behavior-macro-one-param"; \
#binding-cells = <1>; \
__VA_ARGS__ \
@@ -24,7 +21,6 @@ name: name { \
#define ZMK_MACRO2(name,...) \
name: name { \
- label = ZMK_MACRO_STRINGIFY(ZM_ ## name); \
compatible = "zmk,behavior-macro-two-param"; \
#binding-cells = <2>; \
__VA_ARGS__ \
@@ -32,63 +28,53 @@ name: name { \
/ {
behaviors {
- macro_tap: macro_control_mode_tap {
+ macro_tap: macro_tap {
compatible = "zmk,macro-control-mode-tap";
- label = "MAC_TAP";
#binding-cells = <0>;
};
- macro_press: macro_control_mode_press {
+ macro_press: macro_press {
compatible = "zmk,macro-control-mode-press";
- label = "MAC_PRESS";
#binding-cells = <0>;
};
- macro_release: macro_control_mode_release {
+ macro_release: macro_release {
compatible = "zmk,macro-control-mode-release";
- label = "MAC_REL";
#binding-cells = <0>;
};
- macro_tap_time: macro_control_tap_time {
+ macro_tap_time: macro_tap_time {
compatible = "zmk,macro-control-tap-time";
- label = "MAC_TAP_TIME";
#binding-cells = <1>;
};
- macro_wait_time: macro_control_wait_time {
+ macro_wait_time: macro_wait_time {
compatible = "zmk,macro-control-wait-time";
- label = "MAC_WAIT_TIME";
#binding-cells = <1>;
};
macro_pause_for_release: macro_pause_for_release {
compatible = "zmk,macro-pause-for-release";
- label = "MAC_WAIT_REL";
#binding-cells = <0>;
};
macro_param_1to1: macro_param_1to1 {
compatible = "zmk,macro-param-1to1";
- label = "MAC_PARAM_1TO1";
#binding-cells = <0>;
};
macro_param_1to2: macro_param_1to2 {
compatible = "zmk,macro-param-1to2";
- label = "MAC_PARAM_1TO2";
#binding-cells = <0>;
};
macro_param_2to1: macro_param_2to1 {
compatible = "zmk,macro-param-2to1";
- label = "MAC_PARAM_2TO1";
#binding-cells = <0>;
};
macro_param_2to2: macro_param_2to2 {
compatible = "zmk,macro-param-2to2";
- label = "MAC_PARAM_2TO2";
#binding-cells = <0>;
};
};
diff --git a/app/dts/behaviors/mod_tap.dtsi b/app/dts/behaviors/mod_tap.dtsi
index d441a4f115..38bb34fe5c 100644
--- a/app/dts/behaviors/mod_tap.dtsi
+++ b/app/dts/behaviors/mod_tap.dtsi
@@ -6,9 +6,8 @@
/ {
behaviors {
- /omit-if-no-ref/ mt: behavior_mod_tap {
+ /omit-if-no-ref/ mt: mod_tap {
compatible = "zmk,behavior-hold-tap";
- label = "MOD_TAP";
#binding-cells = <2>;
flavor = "hold-preferred";
tapping-term-ms = <200>;
diff --git a/app/dts/behaviors/momentary_layer.dtsi b/app/dts/behaviors/momentary_layer.dtsi
index d1c91232f1..6d85165dbb 100644
--- a/app/dts/behaviors/momentary_layer.dtsi
+++ b/app/dts/behaviors/momentary_layer.dtsi
@@ -6,9 +6,8 @@
/ {
behaviors {
- /omit-if-no-ref/ mo: behavior_momentary_layer {
+ /omit-if-no-ref/ mo: momentary_layer {
compatible = "zmk,behavior-momentary-layer";
- label = "MO";
#binding-cells = <1>;
};
};
diff --git a/app/dts/behaviors/none.dtsi b/app/dts/behaviors/none.dtsi
index fc4890c391..13d056f0cf 100644
--- a/app/dts/behaviors/none.dtsi
+++ b/app/dts/behaviors/none.dtsi
@@ -6,9 +6,8 @@
/ {
behaviors {
- /omit-if-no-ref/ none: behavior_none {
+ /omit-if-no-ref/ none: none {
compatible = "zmk,behavior-none";
- label = "NONE";
#binding-cells = <0>;
};
};
diff --git a/app/dts/behaviors/outputs.dtsi b/app/dts/behaviors/outputs.dtsi
index 88e8f88275..f773719671 100644
--- a/app/dts/behaviors/outputs.dtsi
+++ b/app/dts/behaviors/outputs.dtsi
@@ -6,9 +6,8 @@
/ {
behaviors {
- /omit-if-no-ref/ out: behavior_outputs {
+ /omit-if-no-ref/ out: outputs {
compatible = "zmk,behavior-outputs";
- label = "OUTPUTS";
#binding-cells = <1>;
};
};
diff --git a/app/dts/behaviors/reset.dtsi b/app/dts/behaviors/reset.dtsi
index 2e775269af..e407b107b9 100644
--- a/app/dts/behaviors/reset.dtsi
+++ b/app/dts/behaviors/reset.dtsi
@@ -8,15 +8,15 @@
/ {
behaviors {
- sys_reset: behavior_reset {
+ // Behavior can be invoked on peripherals, so name must be <= 8 characters.
+ sys_reset: sysreset {
compatible = "zmk,behavior-reset";
- label = "SYSRESET";
#binding-cells = <0>;
};
- bootloader: behavior_reset_dfu {
+ // Behavior can be invoked on peripherals, so name must be <= 8 characters.
+ bootloader: bootload {
compatible = "zmk,behavior-reset";
- label = "BOOTLOAD";
type = <RST_UF2>;
#binding-cells = <0>;
};
diff --git a/app/dts/behaviors/rgb_underglow.dtsi b/app/dts/behaviors/rgb_underglow.dtsi
index 6ffec2e676..969518a6ff 100644
--- a/app/dts/behaviors/rgb_underglow.dtsi
+++ b/app/dts/behaviors/rgb_underglow.dtsi
@@ -6,9 +6,9 @@
/ {
behaviors {
- rgb_ug: behavior_rgb_underglow {
+ // Behavior can be invoked on peripherals, so name must be <= 8 characters.
+ rgb_ug: rgb_ug {
compatible = "zmk,behavior-rgb-underglow";
- label = "RGB_UG";
#binding-cells = <2>;
};
};
diff --git a/app/dts/behaviors/sensor_rotate_key_press.dtsi b/app/dts/behaviors/sensor_rotate_key_press.dtsi
index dc30b7989b..d9bdbfe543 100644
--- a/app/dts/behaviors/sensor_rotate_key_press.dtsi
+++ b/app/dts/behaviors/sensor_rotate_key_press.dtsi
@@ -7,9 +7,8 @@
/ {
behaviors {
/* DEPRECATED: `inc_dec_cp` will be removed in the future */
- /omit-if-no-ref/ inc_dec_cp: inc_dec_kp: behavior_sensor_rotate_key_press {
+ /omit-if-no-ref/ inc_dec_cp: inc_dec_kp: enc_key_press {
compatible = "zmk,behavior-sensor-rotate-var";
- label = "ENC_KEY_PRESS";
#sensor-binding-cells = <2>;
bindings = <&kp>, <&kp>;
};
diff --git a/app/dts/behaviors/sticky_key.dtsi b/app/dts/behaviors/sticky_key.dtsi
index 72a80a903a..c8973d4df2 100644
--- a/app/dts/behaviors/sticky_key.dtsi
+++ b/app/dts/behaviors/sticky_key.dtsi
@@ -6,17 +6,15 @@
/ {
behaviors {
- /omit-if-no-ref/ sk: behavior_sticky_key {
+ /omit-if-no-ref/ sk: sticky_key {
compatible = "zmk,behavior-sticky-key";
- label = "STICKY_KEY";
#binding-cells = <1>;
release-after-ms = <1000>;
bindings = <&kp>;
ignore-modifiers;
};
- /omit-if-no-ref/ sl: behavior_sticky_layer {
+ /omit-if-no-ref/ sl: sticky_layer {
compatible = "zmk,behavior-sticky-key";
- label = "STICKY_LAYER";
#binding-cells = <1>;
release-after-ms = <1000>;
bindings = <&mo>;
diff --git a/app/dts/behaviors/to_layer.dtsi b/app/dts/behaviors/to_layer.dtsi
index 0ea66fa9e3..904f023da5 100644
--- a/app/dts/behaviors/to_layer.dtsi
+++ b/app/dts/behaviors/to_layer.dtsi
@@ -6,9 +6,8 @@
/ {
behaviors {
- /omit-if-no-ref/ to: behavior_to_layer {
+ /omit-if-no-ref/ to: to_layer {
compatible = "zmk,behavior-to-layer";
- label = "TO_LAYER";
#binding-cells = <1>;
};
};
diff --git a/app/dts/behaviors/toggle_layer.dtsi b/app/dts/behaviors/toggle_layer.dtsi
index 75730934e4..05f2988e08 100644
--- a/app/dts/behaviors/toggle_layer.dtsi
+++ b/app/dts/behaviors/toggle_layer.dtsi
@@ -6,9 +6,8 @@
/ {
behaviors {
- /omit-if-no-ref/ tog: behavior_toggle_layer {
+ /omit-if-no-ref/ tog: toggle_layer {
compatible = "zmk,behavior-toggle-layer";
- label = "TOGGLE_LAYER";
#binding-cells = <1>;
};
};
diff --git a/app/dts/behaviors/transparent.dtsi b/app/dts/behaviors/transparent.dtsi
index 0dfaade29c..3586f02afa 100644
--- a/app/dts/behaviors/transparent.dtsi
+++ b/app/dts/behaviors/transparent.dtsi
@@ -6,9 +6,8 @@
/ {
behaviors {
- /omit-if-no-ref/ trans: behavior_transparent {
+ /omit-if-no-ref/ trans: transparent {
compatible = "zmk,behavior-transparent";
- label = "TRANS";
#binding-cells = <0>;
};
};