summaryrefslogtreecommitdiff
path: root/quantum/process_keycode
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-01-05 00:37:55 +0000
committerQMK Bot <hello@qmk.fm>2021-01-05 00:37:55 +0000
commitd0aa9ff972e7e438d1a5fa2baa4b35db91c8a070 (patch)
tree9da864d1811a6fc892a346cd3fe8b900f816709c /quantum/process_keycode
parentfd7ab5a22bd5ba85dde3a5da54856784bfb19120 (diff)
parent810eafad121bda333c53490e2d8a29f3a83d9c19 (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'quantum/process_keycode')
-rw-r--r--quantum/process_keycode/process_space_cadet.c11
-rw-r--r--quantum/process_keycode/process_space_cadet.h3
-rw-r--r--quantum/process_keycode/process_tap_dance.c5
3 files changed, 10 insertions, 9 deletions
diff --git a/quantum/process_keycode/process_space_cadet.c b/quantum/process_keycode/process_space_cadet.c
index bcaf62a964..f99db2a87b 100644
--- a/quantum/process_keycode/process_space_cadet.c
+++ b/quantum/process_keycode/process_space_cadet.c
@@ -16,10 +16,6 @@
#include "process_space_cadet.h"
#include "action_tapping.h"
-#ifdef NO_ACTION_TAPPING
-__attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { return TAPPING_TERM; };
-#endif
-
// ********** OBSOLETE DEFINES, STOP USING! (pls?) **********
// Shift / paren setup
#ifndef LSPO_KEY
@@ -97,7 +93,12 @@ void perform_space_cadet(keyrecord_t *record, uint16_t sc_keycode, uint8_t holdM
register_mods(MOD_BIT(holdMod));
}
} else {
- if (sc_last == holdMod && timer_elapsed(sc_timer) < get_tapping_term(sc_keycode, record)) {
+#ifdef TAPPING_TERM_PER_KEY
+ if (sc_last == holdMod && timer_elapsed(sc_timer) < get_tapping_term(sc_keycode, record))
+#else
+ if (sc_last == holdMod && timer_elapsed(sc_timer) < TAPPING_TERM)
+#endif
+ {
if (holdMod != tapMod) {
if (IS_MOD(holdMod)) {
unregister_mods(MOD_BIT(holdMod));
diff --git a/quantum/process_keycode/process_space_cadet.h b/quantum/process_keycode/process_space_cadet.h
index 3ace073997..fcb70f3b43 100644
--- a/quantum/process_keycode/process_space_cadet.h
+++ b/quantum/process_keycode/process_space_cadet.h
@@ -19,6 +19,3 @@
void perform_space_cadet(keyrecord_t *record, uint16_t sc_keycode, uint8_t holdMod, uint8_t tapMod, uint8_t keycode);
bool process_space_cadet(uint16_t keycode, keyrecord_t *record);
-#ifdef NO_ACTION_TAPPING
-uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record);
-#endif
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c
index 0c7b6353eb..138de0eba2 100644
--- a/quantum/process_keycode/process_tap_dance.c
+++ b/quantum/process_keycode/process_tap_dance.c
@@ -14,7 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
-#include "action_tapping.h"
#ifndef NO_ACTION_ONESHOT
uint8_t get_oneshot_mods(void);
@@ -167,7 +166,11 @@ void matrix_scan_tap_dance() {
if (action->custom_tapping_term > 0) {
tap_user_defined = action->custom_tapping_term;
} else {
+#ifdef TAPPING_TERM_PER_KEY
tap_user_defined = get_tapping_term(action->state.keycode, NULL);
+#else
+ tap_user_defined = TAPPING_TERM;
+#endif
}
if (action->state.count && timer_elapsed(action->state.timer) > tap_user_defined) {
process_tap_dance_action_on_dance_finished(action);