global if behavior name starts with 'layer'
This commit is contained in:
parent
5a81624746
commit
03552cd6a8
2 changed files with 7 additions and 2 deletions
|
@ -128,7 +128,12 @@ static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding,
|
|||
case RGB_EFR_CMD:
|
||||
return zmk_rgb_underglow_cycle_effect(-1);
|
||||
case RGB_COLOR_HSB_CMD:
|
||||
LOG_DBG("RGB_COLOR_HSB_CMD");
|
||||
#if ZMK_BLE_IS_CENTRAL
|
||||
LOG_DBG("central RGB_COLOR_HSB_CMD (sending binding to peripheral)");
|
||||
zmk_split_bt_invoke_behavior(0, &binding, event, true);
|
||||
#else
|
||||
LOG_DBG("peripheral RGB_COLOR_HSB_CMD (nothing special)");
|
||||
#endif
|
||||
return zmk_rgb_underglow_set_hsb((struct zmk_led_hsb){.h = (binding->param2 >> 16) & 0xFFFF,
|
||||
.s = (binding->param2 >> 8) & 0xFF,
|
||||
.b = binding->param2 & 0xFF});
|
||||
|
|
|
@ -233,7 +233,7 @@ int zmk_keymap_apply_position_state(uint8_t source, int layer, uint32_t position
|
|||
case BEHAVIOR_LOCALITY_GLOBAL:
|
||||
LOG_DBG("locality is: BEHAVIOR_LOCALITY_GLOBAL - Invoking %s", log_strdup(binding.behavior_dev));
|
||||
#if ZMK_BLE_IS_CENTRAL
|
||||
LOG_DBG("BEHAVIOR_LOCALITY_GLOBAL is central");
|
||||
LOG_DBG("BEHAVIOR_LOCALITY_GLOBAL is central, calling binding on the peripheral...");
|
||||
for (int i = 0; i < ZMK_BLE_SPLIT_PERIPHERAL_COUNT; i++) {
|
||||
zmk_split_bt_invoke_behavior(i, &binding, event, pressed);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue