aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/action_tapping.c
diff options
context:
space:
mode:
authorNimish Gåtam2025-11-02 00:17:50 +0100
committerGitHub2025-11-02 00:17:50 +0100
commit8c93a33cd3c77ad3296c84a642d5f889fd13fac7 (patch)
tree135080c17b8e864a4f0cf422caececa1d844daf8 /quantum/action_tapping.c
parent6aade0ecdc7283b470a6dd1cccaa61268e3d5c53 (diff)
making flowtap timer public so it can be used easily with combos (#25731)
Diffstat (limited to 'quantum/action_tapping.c')
-rw-r--r--quantum/action_tapping.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c
index b105cd60a9..c2f45ea178 100644
--- a/quantum/action_tapping.c
+++ b/quantum/action_tapping.c
@@ -883,6 +883,13 @@ static bool flow_tap_key_if_within_term(keyrecord_t *record, uint16_t prev_time)
return false;
}
+// Checks both flow_tap_expired flag and elapsed time to determine
+// if the key is within the flow tap term.
+bool within_flow_tap_term(uint16_t keycode, keyrecord_t *record) {
+ uint16_t term = get_flow_tap_term(keycode, record, flow_tap_prev_keycode);
+ return !flow_tap_expired && TIMER_DIFF_16(record->event.time, flow_tap_prev_time) <= term;
+}
+
// By default, enable Flow Tap for the keys in the main alphas area and Space.
// This should work reasonably even if the layout is remapped on the host to an
// alt layout or international layout (e.g. Dvorak or AZERTY), where these same