This commit is contained in:
yanshay 2023-09-29 00:51:22 +08:00 committed by GitHub
commit 4aed0bc8a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -272,6 +272,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);
}
@ -281,6 +289,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);
}