fix combo not interrupting tap-dance (and maybe more)
This commit is contained in:
parent
7434a6b99b
commit
1527de2b79
1 changed files with 14 additions and 0 deletions
|
@ -271,6 +271,14 @@ static inline int press_combo_behavior(struct combo_cfg *combo, int32_t timestam
|
||||||
.timestamp = timestamp,
|
.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);
|
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,
|
.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);
|
return behavior_keymap_binding_released(&combo->behavior, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue