From 47e7343ae467f7d1eb08cfb2b116adbe9c576991 Mon Sep 17 00:00:00 2001 From: Theo Lemay Date: Mon, 22 May 2023 18:37:10 -0700 Subject: [PATCH] fix: tweak comments --- app/src/combo.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/combo.c b/app/src/combo.c index ee2a8cfd..1a09f8e8 100644 --- a/app/src/combo.c +++ b/app/src/combo.c @@ -29,9 +29,8 @@ struct combo_cfg { int32_t key_positions[CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO]; int32_t key_position_len; int32_t timeout_ms; - // if slow release is set, the combo releases when the last key in slow_release_positions is - // released or all keys are released. otherwise, the combo releases when the first key is - // released. + // if slow release is set, the combo releases when any key in slow_release_positions is released + // or all keys are released. otherwise, the combo releases when the first key is released. bool slow_release; int32_t slow_release_positions[CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO]; int32_t slow_release_positions_len; @@ -406,7 +405,7 @@ static bool release_combo_key(int32_t position, int64_t timestamp, const zmk_eve for (int i = 1; i < active_combo->combo->behaviors_len; i++) { // loop through every behavior except the first. If the behavior is a partial hold // position, process it. If the next behavior is also a behavior, press that - // behavior instead of the partial hold position. + // behavior instead of the key at the position. struct zmk_behavior_binding *binding = &active_combo->combo->behaviors[i]; // if the behavior is not a partial hold position, skip it if (!IS_PARTIAL_HOLD_POSITION(binding->behavior_dev)) { @@ -420,7 +419,7 @@ static bool release_combo_key(int32_t position, int64_t timestamp, const zmk_eve : !IS_PARTIAL_HOLD_POSITION( active_combo->combo->behaviors[i + 1].behavior_dev); - // if all keys are pressed, press all other partial hold keys that are still held + // if all keys were pressed, press all other partial hold keys that are still held if (all_keys_pressed) { // except the one that was released if (partial_hold_position != position) {