1
0
Fork 0

fix permissive hold when both PERMISSIVE_HOLD_PER_KEY and TAPPING_TERM_PER_KEY are defined (#12125)

Co-authored-by: checyr <32964049+checyr@users.noreply.github.com>
This commit is contained in:
purple-rw 2021-03-25 05:13:41 -07:00 committed by GitHub
parent 816f2f9cc2
commit 5c1442766c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -121,12 +121,20 @@ bool process_tapping(keyrecord_t *keyp) {
*/ */
# if defined(TAPPING_TERM_PER_KEY) || (TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY) # if defined(TAPPING_TERM_PER_KEY) || (TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY)
else if ( else if (
((
# ifdef TAPPING_TERM_PER_KEY # ifdef TAPPING_TERM_PER_KEY
(get_tapping_term(get_event_keycode(tapping_key.event, false), keyp) >= 500) && get_tapping_term(get_event_keycode(tapping_key.event, false), keyp)
# else
TAPPING_TERM
# endif # endif
>= 500 )
# ifdef PERMISSIVE_HOLD_PER_KEY # ifdef PERMISSIVE_HOLD_PER_KEY
!get_permissive_hold(get_event_keycode(tapping_key.event, false), keyp) && || get_permissive_hold(get_event_keycode(tapping_key.event, false), keyp)
# elif defined(PERMISSIVE_HOLD)
|| true
# endif # endif
) &&
IS_RELEASED(event) && waiting_buffer_typed(event)) { IS_RELEASED(event) && waiting_buffer_typed(event)) {
debug("Tapping: End. No tap. Interfered by typing key\n"); debug("Tapping: End. No tap. Interfered by typing key\n");
process_record(&tapping_key); process_record(&tapping_key);