diff --git a/app/src/behaviors/behavior_momentary_layer.c b/app/src/behaviors/behavior_momentary_layer.c index 46e49fcc..f08e3d87 100644 --- a/app/src/behaviors/behavior_momentary_layer.c +++ b/app/src/behaviors/behavior_momentary_layer.c @@ -22,6 +22,7 @@ static int behavior_mo_init(const struct device *dev) { return 0; }; static int mo_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { + printk("GUIDO: mo layer %d", binding->param1) LOG_DBG("position %d layer %d", event.position, binding->param1); return zmk_keymap_layer_activate(binding->param1); } diff --git a/app/src/keymap.c b/app/src/keymap.c index 03aec3d5..2780342f 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -85,15 +85,8 @@ static inline int set_layer_state(uint8_t layer, bool state) { return -EINVAL; } - printk("GUIDO: highest layer active: %d\n", zmk_keymap_highest_layer_active()); - - if (state) { - printk("GUIDO: layer %d\n", layer); - } - // Default layer should *always* remain active if (layer == _zmk_keymap_layer_default && !state) { - printk("GUIDO: layer 0\n"); return 0; } @@ -101,6 +94,7 @@ static inline int set_layer_state(uint8_t layer, bool state) { WRITE_BIT(_zmk_keymap_layer_state, layer, state); // Don't send state changes unless there was an actual change if (old_state != _zmk_keymap_layer_state) { + printk("GUIDO: layer %d, new state set: %d\n", layer, _zmk_keymap_layer_state); LOG_DBG("layer_changed: layer %d state %d", layer, state); ZMK_EVENT_RAISE(create_layer_state_changed(layer, state)); }