From 3b9e186019f74d5046fbdd399b5cfa0baf513a75 Mon Sep 17 00:00:00 2001 From: precondition <57645186+precondition@users.noreply.github.com> Date: Fri, 24 Jun 2022 12:40:09 +0200 Subject: Do not enable PERMISSIVE_HOLD when TAPPING_TERM exceeds 500ms (#15674) --- quantum/action_tapping.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'quantum/action_tapping.c') diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c index 3c8b5678b7..df3317ac05 100644 --- a/quantum/action_tapping.c +++ b/quantum/action_tapping.c @@ -125,7 +125,7 @@ void action_tapping_process(keyrecord_t record) { /* return true when key event is processed or consumed. */ bool process_tapping(keyrecord_t *keyp) { keyevent_t event = keyp->event; -# if (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) || defined(TAPPING_TERM_PER_KEY) || defined(PERMISSIVE_HOLD_PER_KEY) || defined(TAPPING_FORCE_HOLD_PER_KEY) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) +# if (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) || defined(PERMISSIVE_HOLD_PER_KEY) || defined(TAPPING_FORCE_HOLD_PER_KEY) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) uint16_t tapping_keycode = get_record_keycode(&tapping_key, false); # endif @@ -164,17 +164,15 @@ bool process_tapping(keyrecord_t *keyp) { * useful for long TAPPING_TERM but may prevent fast typing. */ // clang-format off -# if defined(TAPPING_TERM_PER_KEY) || (TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY) || (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) +# if defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY) || (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) else if ( ( - ( - GET_TAPPING_TERM(tapping_keycode, &tapping_key) >= 500 + IS_RELEASED(event) && waiting_buffer_typed(event) # ifdef PERMISSIVE_HOLD_PER_KEY - || get_permissive_hold(tapping_keycode, &tapping_key) + && get_permissive_hold(tapping_keycode, &tapping_key) # elif defined(PERMISSIVE_HOLD) - || true + && true # endif - ) && IS_RELEASED(event) && waiting_buffer_typed(event) ) // Causes nested taps to not wait past TAPPING_TERM/RETRO_SHIFT // unnecessarily and fixes them for Layer Taps. -- cgit v1.2.3