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>
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user