summaryrefslogtreecommitdiff
path: root/quantum/process_keycode/process_auto_shift.c
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2022-04-16 20:24:09 +0200
committerGitHub <noreply@github.com>2022-04-16 11:24:09 -0700
commit8f585153c470b07bb0c529ff49b39ef45f68d37e (patch)
tree5441986fa041cd2d966b800af3f82d69b55e4d58 /quantum/process_keycode/process_auto_shift.c
parentcad0af09a8a280d918b726eb472c86065dc5c079 (diff)
Add GET_TAPPING_TERM macro to reduce duplicate code (#16681)
* Add GET_TAPPING_TERM macro to reduce duplicate code The macro gives the right tapping term depending on whether per-key tapping terms and/or dynamic tapping terms are enabled. Unnecessary function calls and variable resolution are avoided. Fixes #16472. * Use GET_TAPPING_TERM for Cirque trackpads Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
Diffstat (limited to 'quantum/process_keycode/process_auto_shift.c')
-rw-r--r--quantum/process_keycode/process_auto_shift.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c
index 2150edd7b2..e6a7c01f2a 100644
--- a/quantum/process_keycode/process_auto_shift.c
+++ b/quantum/process_keycode/process_auto_shift.c
@@ -182,12 +182,7 @@ static bool autoshift_press(uint16_t keycode, uint16_t now, keyrecord_t *record)
# endif
) &&
# endif
- TIMER_DIFF_16(now, autoshift_time) <
-# ifdef TAPPING_TERM_PER_KEY
- get_tapping_term(autoshift_lastkey, record)
-# else
- TAPPING_TERM
-# endif
+ TIMER_DIFF_16(now, autoshift_time) < GET_TAPPING_TERM(autoshift_lastkey, record)
) {
// clang-format on
// Allow a tap-then-hold for keyrepeat.