aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/src
diff options
context:
space:
mode:
authorCem Aksoylar <[email protected]>2024-08-09 00:07:21 -0700
committerPete Johanson <[email protected]>2024-09-23 10:17:29 -0600
commit4fdfb01b6aa3715ae9e28391991f8bb1b604db4d (patch)
tree762baaa572569c89090ad2da6e44269887266e18 /app/src
parent9e36ebd52587c0364562057466a458fdcfcdc685 (diff)
downloadzmk-4fdfb01b6aa3715ae9e28391991f8bb1b604db4d.tar.gz
zmk-4fdfb01b6aa3715ae9e28391991f8bb1b604db4d.zip
feat(split): Make combos invoke behaviors with locality
TODO: Currently the source is hardcoded to central for source local behaviors
Diffstat (limited to 'app/src')
-rw-r--r--app/src/combo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/combo.c b/app/src/combo.c
index 3f78878f01..a990e2f2a6 100644
--- a/app/src/combo.c
+++ b/app/src/combo.c
@@ -291,21 +291,23 @@ static int release_pressed_keys() {
static inline int press_combo_behavior(struct combo_cfg *combo, int32_t timestamp) {
struct zmk_behavior_binding_event event = {
.position = combo->virtual_key_position,
+ .source = ZMK_POSITION_STATE_CHANGE_SOURCE_LOCAL,
.timestamp = timestamp,
};
last_combo_timestamp = timestamp;
- return behavior_keymap_binding_pressed(&combo->behavior, event);
+ return zmk_behavior_invoke_binding(&combo->behavior, event, true);
}
static inline int release_combo_behavior(struct combo_cfg *combo, int32_t timestamp) {
struct zmk_behavior_binding_event event = {
.position = combo->virtual_key_position,
+ .source = ZMK_POSITION_STATE_CHANGE_SOURCE_LOCAL,
.timestamp = timestamp,
};
- return behavior_keymap_binding_released(&combo->behavior, event);
+ return zmk_behavior_invoke_binding(&combo->behavior, event, false);
}
static void move_pressed_keys_to_active_combo(struct active_combo *active_combo) {