Skip to content

Commit

Permalink
fix(behaviors): Add missing hold-tap trigger
Browse files Browse the repository at this point in the history
A hold-tap trigger was missing in the scenario where a hold-tap behavior
was queued for a while and it's timer should've run out.
  • Loading branch information
okke-formsma authored and petejohanson committed Feb 27, 2021
1 parent 0c1940b commit 3200882
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/behaviors/behavior_hold_tap.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,8 @@ static int on_hold_tap_binding_pressed(struct zmk_behavior_binding *binding,
int32_t tapping_term_ms_left = (hold_tap->timestamp + cfg->tapping_term_ms) - k_uptime_get();
if (tapping_term_ms_left > 0) {
k_delayed_work_submit(&hold_tap->work, K_MSEC(tapping_term_ms_left));
} else {
decide_hold_tap(hold_tap, HT_TIMER_EVENT);
}

return ZMK_BEHAVIOR_OPAQUE;
Expand Down

0 comments on commit 3200882

Please sign in to comment.