diff --git a/quantum/wpm.c b/quantum/wpm.c index 55c00c877948..c44b1172b5a1 100644 --- a/quantum/wpm.c +++ b/quantum/wpm.c @@ -74,7 +74,11 @@ void update_wpm(uint16_t keycode) { wpm_timer = timer_read(); } #ifdef WPM_ALLOW_COUNT_REGRESSION - current_wpm -= wpm_regress_count(keycode); + uint8_t regress = wpm_regress_count(keycode); + if (regress) { + current_wpm -= regress; + wpm_timer = timer_read(); + } #endif } diff --git a/quantum/wpm.h b/quantum/wpm.h index a6d319bd98bf..079401eb4da5 100644 --- a/quantum/wpm.h +++ b/quantum/wpm.h @@ -32,7 +32,7 @@ bool wpm_keycode_kb(uint16_t keycode); bool wpm_keycode_user(uint16_t keycode); #ifdef WPM_ALLOW_COUNT_REGRESSION -bool wpm_regress_count(uint16_t keycode); +uint8_t wpm_regress_count(uint16_t keycode); #endif void set_current_wpm(uint8_t);