diff options
author | purple-rw <32964049+purple-rw@users.noreply.github.com> | 2021-03-25 05:13:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-25 23:13:41 +1100 |
commit | 5c1442766c10e98a0152b847ccf4d48899558cea (patch) | |
tree | 5fb4680ffc3dedaf8e51b1b14437e9642148f225 | |
parent | 816f2f9cc234b5a98512a483b2781b1c2875f24f (diff) | |
download | qmk_firmware-5c1442766c10e98a0152b847ccf4d48899558cea.tar.gz qmk_firmware-5c1442766c10e98a0152b847ccf4d48899558cea.zip |
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>
-rw-r--r-- | tmk_core/common/action_tapping.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c index fe545c79a..25b200448 100644 --- a/tmk_core/common/action_tapping.c +++ b/tmk_core/common/action_tapping.c | |||
@@ -121,12 +121,20 @@ bool process_tapping(keyrecord_t *keyp) { | |||
121 | */ | 121 | */ |
122 | # if defined(TAPPING_TERM_PER_KEY) || (TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY) | 122 | # if defined(TAPPING_TERM_PER_KEY) || (TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY) |
123 | else if ( | 123 | else if ( |
124 | (( | ||
124 | # ifdef TAPPING_TERM_PER_KEY | 125 | # ifdef TAPPING_TERM_PER_KEY |
125 | (get_tapping_term(get_event_keycode(tapping_key.event, false), keyp) >= 500) && | 126 | get_tapping_term(get_event_keycode(tapping_key.event, false), keyp) |
127 | # else | ||
128 | TAPPING_TERM | ||
126 | # endif | 129 | # endif |
130 | >= 500 ) | ||
131 | |||
127 | # ifdef PERMISSIVE_HOLD_PER_KEY | 132 | # ifdef PERMISSIVE_HOLD_PER_KEY |
128 | !get_permissive_hold(get_event_keycode(tapping_key.event, false), keyp) && | 133 | || get_permissive_hold(get_event_keycode(tapping_key.event, false), keyp) |
134 | # elif defined(PERMISSIVE_HOLD) | ||
135 | || true | ||
129 | # endif | 136 | # endif |
137 | ) && | ||
130 | IS_RELEASED(event) && waiting_buffer_typed(event)) { | 138 | IS_RELEASED(event) && waiting_buffer_typed(event)) { |
131 | debug("Tapping: End. No tap. Interfered by typing key\n"); | 139 | debug("Tapping: End. No tap. Interfered by typing key\n"); |
132 | process_record(&tapping_key); | 140 | process_record(&tapping_key); |