refactor(behaviors): global-quick-tap -> require-prior-idle

Renaming global-quick-tap-ms to require-prior-idle.
This commit is contained in:
Andrew Rae
2023-09-24 09:38:45 -04:00
committed by Pete Johanson
parent 49c393e8f8
commit b85ffa4b6c
39 changed files with 41 additions and 41 deletions

View File

@@ -31,7 +31,7 @@ struct combo_cfg {
int32_t key_position_len;
struct zmk_behavior_binding behavior;
int32_t timeout_ms;
int32_t global_quick_tap_ms;
int32_t require_prior_idle_ms;
// if slow release is set, the combo releases when the last key is released.
// otherwise, the combo releases when the first key is released.
bool slow_release;
@@ -136,7 +136,7 @@ static bool combo_active_on_layer(struct combo_cfg *combo, uint8_t layer) {
}
static bool is_quick_tap(struct combo_cfg *combo, int64_t timestamp) {
return (last_tapped_timestamp + combo->global_quick_tap_ms) > timestamp;
return (last_tapped_timestamp + combo->require_prior_idle_ms) > timestamp;
}
static int setup_candidates_for_first_keypress(int32_t position, int64_t timestamp) {
@@ -523,7 +523,7 @@ ZMK_SUBSCRIPTION(combo, zmk_keycode_state_changed);
#define COMBO_INST(n) \
static struct combo_cfg combo_config_##n = { \
.timeout_ms = DT_PROP(n, timeout_ms), \
.global_quick_tap_ms = DT_PROP(n, global_quick_tap_ms), \
.require_prior_idle_ms = DT_PROP(n, require_prior_idle_ms), \
.key_positions = DT_PROP(n, key_positions), \
.key_position_len = DT_PROP_LEN(n, key_positions), \
.behavior = ZMK_KEYMAP_EXTRACT_BINDING(0, n), \