fix combo not interrupting tap-dance (and maybe more)

This commit is contained in:
yanshay 2023-03-13 19:57:17 +02:00
parent 7434a6b99b
commit 1527de2b79

View file

@ -271,6 +271,14 @@ static inline int press_combo_behavior(struct combo_cfg *combo, int32_t timestam
.timestamp = timestamp,
};
last_combo_timestamp = timestamp;
ZMK_EVENT_RAISE(new_zmk_position_state_changed(
(struct zmk_position_state_changed){.source = 0, // not ZMK_POSITION_STATE_CHANGE_SOURCE_LOCAL,
.state = true,
.position = -1, // not combo->virtual_key_position,
.timestamp = timestamp}));
return behavior_keymap_binding_pressed(&combo->behavior, event);
}
@ -280,6 +288,12 @@ static inline int release_combo_behavior(struct combo_cfg *combo, int32_t timest
.timestamp = timestamp,
};
ZMK_EVENT_RAISE(new_zmk_position_state_changed(
(struct zmk_position_state_changed){.source = 0, // not ZMK_POSITION_STATE_CHANGE_SOURCE_LOCAL,
.state = false,
.position = -1, // not combo->virtual_key_position,
.timestamp = timestamp}));
return behavior_keymap_binding_released(&combo->behavior, event);
}