From 48a79b08ccbcd0af5269e2e9334042c8347d18f8 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 18 Feb 2023 17:08:03 -0800 Subject: Fix functions when `NO_ACTION_TAPPING` is defined (#11528) --- quantum/process_keycode/process_autocorrect.c | 6 +++++- quantum/process_keycode/process_caps_word.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'quantum/process_keycode') diff --git a/quantum/process_keycode/process_autocorrect.c b/quantum/process_keycode/process_autocorrect.c index c89dffeaad..1376788266 100644 --- a/quantum/process_keycode/process_autocorrect.c +++ b/quantum/process_keycode/process_autocorrect.c @@ -128,7 +128,11 @@ __attribute__((weak)) bool process_autocorrect_user(uint16_t *keycode, keyrecord #ifdef SWAP_HANDS_ENABLE // Note: IS_SWAP_HANDS_KEYCODE() actually tests for the special action keycodes like SH_TOGG, SH_TT, ..., // which currently overlap the SH_T(kc) range. - if (IS_SWAP_HANDS_KEYCODE(*keycode) || !record->tap.count) { + if (IS_SWAP_HANDS_KEYCODE(*keycode) +# ifndef NO_ACTION_TAPPING + || !record->tap.count +# endif // NO_ACTION_TAPPING + ) { return false; } *keycode = QK_SWAP_HANDS_GET_TAP_KEYCODE(*keycode); diff --git a/quantum/process_keycode/process_caps_word.c b/quantum/process_keycode/process_caps_word.c index 933abe629e..94302b29ae 100644 --- a/quantum/process_keycode/process_caps_word.c +++ b/quantum/process_keycode/process_caps_word.c @@ -145,7 +145,11 @@ bool process_caps_word(uint16_t keycode, keyrecord_t* record) { case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX: // Note: IS_SWAP_HANDS_KEYCODE() actually tests for the special action keycodes like SH_TOGG, SH_TT, ..., // which currently overlap the SH_T(kc) range. - if (IS_SWAP_HANDS_KEYCODE(keycode) || record->tap.count == 0) { + if (IS_SWAP_HANDS_KEYCODE(keycode) +# ifndef NO_ACTION_TAPPING + || record->tap.count == 0 +# endif // NO_ACTION_TAPPING + ) { return true; } keycode = QK_SWAP_HANDS_GET_TAP_KEYCODE(keycode); -- cgit v1.2.3