diff options
author | Drashna Jaelre <drashna@live.com> | 2021-01-04 16:37:20 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-04 16:37:20 -0800 |
commit | 810eafad121bda333c53490e2d8a29f3a83d9c19 (patch) | |
tree | 975b8bd9c846d13f30da944e873326e0e0f69fa8 /quantum/process_keycode/process_space_cadet.c | |
parent | c38fe492426676cf101eeb024f7f33d8e98c445f (diff) | |
download | qmk_firmware-810eafad121bda333c53490e2d8a29f3a83d9c19.tar.gz qmk_firmware-810eafad121bda333c53490e2d8a29f3a83d9c19.zip |
Fix Tap-Hold Configs (#11127)
* Add proper prototypes for Tap-Hold Per Key functions
* Fix handwired/tennie default keymap
* Remove unneeded references
* Fix tapping term per key check in space cadet
* Pre-emptive fix for tap dance
* Fix marksard/leftover30
* Replace hard coded tapping term with define
Diffstat (limited to 'quantum/process_keycode/process_space_cadet.c')
-rw-r--r-- | quantum/process_keycode/process_space_cadet.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/quantum/process_keycode/process_space_cadet.c b/quantum/process_keycode/process_space_cadet.c index bcaf62a96..f99db2a87 100644 --- a/quantum/process_keycode/process_space_cadet.c +++ b/quantum/process_keycode/process_space_cadet.c | |||
@@ -16,10 +16,6 @@ | |||
16 | #include "process_space_cadet.h" | 16 | #include "process_space_cadet.h" |
17 | #include "action_tapping.h" | 17 | #include "action_tapping.h" |
18 | 18 | ||
19 | #ifdef NO_ACTION_TAPPING | ||
20 | __attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { return TAPPING_TERM; }; | ||
21 | #endif | ||
22 | |||
23 | // ********** OBSOLETE DEFINES, STOP USING! (pls?) ********** | 19 | // ********** OBSOLETE DEFINES, STOP USING! (pls?) ********** |
24 | // Shift / paren setup | 20 | // Shift / paren setup |
25 | #ifndef LSPO_KEY | 21 | #ifndef LSPO_KEY |
@@ -97,7 +93,12 @@ void perform_space_cadet(keyrecord_t *record, uint16_t sc_keycode, uint8_t holdM | |||
97 | register_mods(MOD_BIT(holdMod)); | 93 | register_mods(MOD_BIT(holdMod)); |
98 | } | 94 | } |
99 | } else { | 95 | } else { |
100 | if (sc_last == holdMod && timer_elapsed(sc_timer) < get_tapping_term(sc_keycode, record)) { | 96 | #ifdef TAPPING_TERM_PER_KEY |
97 | if (sc_last == holdMod && timer_elapsed(sc_timer) < get_tapping_term(sc_keycode, record)) | ||
98 | #else | ||
99 | if (sc_last == holdMod && timer_elapsed(sc_timer) < TAPPING_TERM) | ||
100 | #endif | ||
101 | { | ||
101 | if (holdMod != tapMod) { | 102 | if (holdMod != tapMod) { |
102 | if (IS_MOD(holdMod)) { | 103 | if (IS_MOD(holdMod)) { |
103 | unregister_mods(MOD_BIT(holdMod)); | 104 | unregister_mods(MOD_BIT(holdMod)); |