From 23ecf081192959f66f5cc064ed81c69f2988e3e7 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sat, 18 Nov 2023 00:47:01 -0600 Subject: [PATCH] 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. --- app/boards/arm/ferris/ferris_rev02.keymap | 1 - app/boards/shields/cradio/cradio.keymap | 1 - .../shields/hummingbird/hummingbird.keymap | 1 - app/boards/shields/lotus58/lotus58.keymap | 3 --- app/boards/shields/qaz/qaz.keymap | 1 - app/boards/shields/tg4x/tg4x.keymap | 1 - app/dts/behaviors/backlight.dtsi | 4 ++-- app/dts/behaviors/bluetooth.dtsi | 3 +-- app/dts/behaviors/caps_word.dtsi | 3 +-- app/dts/behaviors/ext_power.dtsi | 4 ++-- app/dts/behaviors/gresc.dtsi | 1 - app/dts/behaviors/key_press.dtsi | 3 +-- app/dts/behaviors/key_repeat.dtsi | 3 +-- app/dts/behaviors/key_toggle.dtsi | 3 +-- app/dts/behaviors/layer_tap.dtsi | 3 +-- app/dts/behaviors/macros.dtsi | 24 ++++--------------- app/dts/behaviors/mod_tap.dtsi | 3 +-- app/dts/behaviors/momentary_layer.dtsi | 3 +-- app/dts/behaviors/none.dtsi | 3 +-- app/dts/behaviors/outputs.dtsi | 3 +-- app/dts/behaviors/reset.dtsi | 8 +++---- app/dts/behaviors/rgb_underglow.dtsi | 4 ++-- .../behaviors/sensor_rotate_key_press.dtsi | 3 +-- app/dts/behaviors/sticky_key.dtsi | 6 ++--- app/dts/behaviors/to_layer.dtsi | 3 +-- app/dts/behaviors/toggle_layer.dtsi | 3 +-- app/dts/behaviors/transparent.dtsi | 3 +-- app/src/behaviors/behavior_sticky_key.c | 4 +++- .../macros/basic/keycode_events.snapshot | 12 +++++----- .../press-mid-macro/keycode_events.snapshot | 8 +++---- .../timing-override/keycode_events.snapshot | 12 +++++----- .../keycode_events.snapshot | 8 +++---- 32 files changed, 54 insertions(+), 91 deletions(-) diff --git a/app/boards/arm/ferris/ferris_rev02.keymap b/app/boards/arm/ferris/ferris_rev02.keymap index 18fad4232..dc298ec8d 100644 --- a/app/boards/arm/ferris/ferris_rev02.keymap +++ b/app/boards/arm/ferris/ferris_rev02.keymap @@ -20,7 +20,6 @@ behaviors { hm: homerow_mods { compatible = "zmk,behavior-hold-tap"; - label = "homerow mods"; #binding-cells = <2>; tapping_term_ms = <200>; flavor = "tap-preferred"; diff --git a/app/boards/shields/cradio/cradio.keymap b/app/boards/shields/cradio/cradio.keymap index 47bf0422a..ab4591bab 100644 --- a/app/boards/shields/cradio/cradio.keymap +++ b/app/boards/shields/cradio/cradio.keymap @@ -12,7 +12,6 @@ / { behaviors { ht: hold_tap { - label = "hold_tap"; compatible = "zmk,behavior-hold-tap"; #binding-cells = <2>; flavor = "tap-preferred"; diff --git a/app/boards/shields/hummingbird/hummingbird.keymap b/app/boards/shields/hummingbird/hummingbird.keymap index 7a7171e8f..9f1a24c2d 100644 --- a/app/boards/shields/hummingbird/hummingbird.keymap +++ b/app/boards/shields/hummingbird/hummingbird.keymap @@ -19,7 +19,6 @@ behaviors { hm: homerow_mods { compatible = "zmk,behavior-hold-tap"; - label = "homerow mods"; #binding-cells = <2>; tapping_term_ms = <225>; flavor = "tap-preferred"; diff --git a/app/boards/shields/lotus58/lotus58.keymap b/app/boards/shields/lotus58/lotus58.keymap index fae463c92..e9846e817 100644 --- a/app/boards/shields/lotus58/lotus58.keymap +++ b/app/boards/shields/lotus58/lotus58.keymap @@ -23,21 +23,18 @@ behaviors { fofunc: four_ffour { compatible = "zmk,behavior-mod-morph"; - label = "FOUR_FUNCFOUR"; #binding-cells = <0>; bindings = <&kp N4>, <&kp F4>; mods = <(MOD_LALT|MOD_RALT)>; }; sleft: s_left { compatible = "zmk,behavior-mod-morph"; - label = "S_LEFT"; #binding-cells = <0>; bindings = <&kp S>, <&kp LEFT>; mods = <(MOD_LGUI|MOD_RGUI)>; }; fright: f_right { compatible = "zmk,behavior-mod-morph"; - label = "R_RIGHT"; #binding-cells = <0>; bindings = <&kp F>, <&kp RIGHT>; mods = <(MOD_LGUI|MOD_RGUI)>; diff --git a/app/boards/shields/qaz/qaz.keymap b/app/boards/shields/qaz/qaz.keymap index e6794e7bc..c887fb033 100644 --- a/app/boards/shields/qaz/qaz.keymap +++ b/app/boards/shields/qaz/qaz.keymap @@ -16,7 +16,6 @@ behaviors { hm: homerow_mods { compatible = "zmk,behavior-hold-tap"; - label = "homerow mods"; #binding-cells = <2>; tapping-term-ms = <225>; flavor = "tap-preferred"; diff --git a/app/boards/shields/tg4x/tg4x.keymap b/app/boards/shields/tg4x/tg4x.keymap index 89a478ae5..5c71ae5c9 100644 --- a/app/boards/shields/tg4x/tg4x.keymap +++ b/app/boards/shields/tg4x/tg4x.keymap @@ -12,7 +12,6 @@ behaviors { ht: hold_tap { compatible = "zmk,behavior-hold-tap"; - label = "Hold Tap"; #binding-cells = <2>; tapping-term-ms = <200>; flavor = "tap-preferred"; diff --git a/app/dts/behaviors/backlight.dtsi b/app/dts/behaviors/backlight.dtsi index bebd6dfbf..54c83ff44 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 a49ff4d6f..40557b7a2 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 219300dc2..795fbc084 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 = ; }; diff --git a/app/dts/behaviors/ext_power.dtsi b/app/dts/behaviors/ext_power.dtsi index f61170dd5..2ae1daf84 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 fa4c685b7..59a732917 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 b0fc2db10..ddaf7eed3 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 795a77f62..88910f627 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 = ; }; diff --git a/app/dts/behaviors/key_toggle.dtsi b/app/dts/behaviors/key_toggle.dtsi index df581014e..a3e3f36f2 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 1d92245c6..dc953e935 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 36b4a8d33..44bc7ab77 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 d441a4f11..38bb34fe5 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 d1c91232f..6d85165db 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 fc4890c39..13d056f0c 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 88e8f8827..f77371967 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 2e775269a..e407b107b 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 = ; #binding-cells = <0>; }; diff --git a/app/dts/behaviors/rgb_underglow.dtsi b/app/dts/behaviors/rgb_underglow.dtsi index 6ffec2e67..969518a6f 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 dc30b7989..d9bdbfe54 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 72a80a903..c8973d4df 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 0ea66fa9e..904f023da 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 75730934e..05f2988e0 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 0dfaade29..3586f02af 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>; }; }; diff --git a/app/src/behaviors/behavior_sticky_key.c b/app/src/behaviors/behavior_sticky_key.c index c6731d320..67f772862 100644 --- a/app/src/behaviors/behavior_sticky_key.c +++ b/app/src/behaviors/behavior_sticky_key.c @@ -24,6 +24,8 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) +#define KEY_PRESS DEVICE_DT_NAME(DT_INST(0, zmk_behavior_key_press)) + #define ZMK_BHV_STICKY_KEY_MAX_HELD 10 #define ZMK_BHV_STICKY_KEY_POSITION_FREE UINT32_MAX @@ -202,7 +204,7 @@ static int sticky_key_keycode_state_changed_listener(const zmk_event_t *eh) { continue; } - if (strcmp(sticky_key->config->behavior.behavior_dev, "KEY_PRESS") == 0 && + if (strcmp(sticky_key->config->behavior.behavior_dev, KEY_PRESS) == 0 && ZMK_HID_USAGE_ID(sticky_key->param1) == ev_copy.keycode && ZMK_HID_USAGE_PAGE(sticky_key->param1) == ev_copy.usage_page && SELECT_MODS(sticky_key->param1) == ev_copy.implicit_modifiers) { diff --git a/app/tests/macros/basic/keycode_events.snapshot b/app/tests/macros/basic/keycode_events.snapshot index b238a2fff..5639f1d73 100644 --- a/app/tests/macros/basic/keycode_events.snapshot +++ b/app/tests/macros/basic/keycode_events.snapshot @@ -1,18 +1,18 @@ -queue_process_next: Invoking KEY_PRESS: 0x70004 0x00 +queue_process_next: Invoking key_press: 0x70004 0x00 kp_pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 50ms -queue_process_next: Invoking KEY_PRESS: 0x70004 0x00 +queue_process_next: Invoking key_press: 0x70004 0x00 kp_released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 10ms -queue_process_next: Invoking KEY_PRESS: 0x70005 0x00 +queue_process_next: Invoking key_press: 0x70005 0x00 kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 50ms -queue_process_next: Invoking KEY_PRESS: 0x70005 0x00 +queue_process_next: Invoking key_press: 0x70005 0x00 kp_released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 10ms -queue_process_next: Invoking KEY_PRESS: 0x70006 0x00 +queue_process_next: Invoking key_press: 0x70006 0x00 kp_pressed: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 50ms -queue_process_next: Invoking KEY_PRESS: 0x70006 0x00 +queue_process_next: Invoking key_press: 0x70006 0x00 kp_released: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 10ms diff --git a/app/tests/macros/press-mid-macro/keycode_events.snapshot b/app/tests/macros/press-mid-macro/keycode_events.snapshot index 22393a3ad..0ec7ccb3c 100644 --- a/app/tests/macros/press-mid-macro/keycode_events.snapshot +++ b/app/tests/macros/press-mid-macro/keycode_events.snapshot @@ -1,8 +1,8 @@ -pos_state: layer: 0 position: 0, binding name: ZM_abc_macro +pos_state: layer: 0 position: 0, binding name: abc_macro kp_pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 -pos_state: layer: 0 position: 0, binding name: ZM_abc_macro -pos_state: layer: 0 position: 1, binding name: MO -pos_state: layer: 0 position: 1, binding name: MO +pos_state: layer: 0 position: 0, binding name: abc_macro +pos_state: layer: 0 position: 1, binding name: momentary_layer +pos_state: layer: 0 position: 1, binding name: momentary_layer kp_released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 kp_released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/macros/timing-override/keycode_events.snapshot b/app/tests/macros/timing-override/keycode_events.snapshot index 0ff45904b..e275cf9b3 100644 --- a/app/tests/macros/timing-override/keycode_events.snapshot +++ b/app/tests/macros/timing-override/keycode_events.snapshot @@ -1,18 +1,18 @@ -queue_process_next: Invoking KEY_PRESS: 0x70004 0x00 +queue_process_next: Invoking key_press: 0x70004 0x00 kp_pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 30ms -queue_process_next: Invoking KEY_PRESS: 0x70004 0x00 +queue_process_next: Invoking key_press: 0x70004 0x00 kp_released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 50ms -queue_process_next: Invoking KEY_PRESS: 0x70005 0x00 +queue_process_next: Invoking key_press: 0x70005 0x00 kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 20ms -queue_process_next: Invoking KEY_PRESS: 0x70005 0x00 +queue_process_next: Invoking key_press: 0x70005 0x00 kp_released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 50ms -queue_process_next: Invoking KEY_PRESS: 0x70006 0x00 +queue_process_next: Invoking key_press: 0x70006 0x00 kp_pressed: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 20ms -queue_process_next: Invoking KEY_PRESS: 0x70006 0x00 +queue_process_next: Invoking key_press: 0x70006 0x00 kp_released: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 50ms diff --git a/app/tests/macros/wait-macro-release/keycode_events.snapshot b/app/tests/macros/wait-macro-release/keycode_events.snapshot index 21d47a299..abe9791f7 100644 --- a/app/tests/macros/wait-macro-release/keycode_events.snapshot +++ b/app/tests/macros/wait-macro-release/keycode_events.snapshot @@ -1,16 +1,16 @@ qm: Iterating macro bindings - starting: 0, count: 4 -queue_process_next: Invoking KEY_PRESS: 0x700e2 0x00 +queue_process_next: Invoking key_press: 0x700e2 0x00 kp_pressed: usage_page 0x07 keycode 0xE2 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 10ms -queue_process_next: Invoking KEY_PRESS: 0x7002b 0x00 +queue_process_next: Invoking key_press: 0x7002b 0x00 kp_pressed: usage_page 0x07 keycode 0x2B implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 40ms -queue_process_next: Invoking KEY_PRESS: 0x7002b 0x00 +queue_process_next: Invoking key_press: 0x7002b 0x00 kp_released: usage_page 0x07 keycode 0x2B implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 10ms kp_pressed: usage_page 0x07 keycode 0x2B implicit_mods 0x00 explicit_mods 0x00 kp_released: usage_page 0x07 keycode 0x2B implicit_mods 0x00 explicit_mods 0x00 qm: Iterating macro bindings - starting: 5, count: 2 -queue_process_next: Invoking KEY_PRESS: 0x700e2 0x00 +queue_process_next: Invoking key_press: 0x700e2 0x00 kp_released: usage_page 0x07 keycode 0xE2 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 0ms