From c6d1488e17888ffd4070cac55deff1b73f191db7 Mon Sep 17 00:00:00 2001 From: Drashna Jael're Date: Thu, 3 Feb 2022 22:44:30 -0800 Subject: [PATCH] move pressed processing --- quantum/process_keycode/process_autocorrect.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/quantum/process_keycode/process_autocorrect.c b/quantum/process_keycode/process_autocorrect.c index 00fd9ed64721..1b119f7b4ed5 100644 --- a/quantum/process_keycode/process_autocorrect.c +++ b/quantum/process_keycode/process_autocorrect.c @@ -41,6 +41,10 @@ bool process_autocorrect(uint16_t keycode, keyrecord_t* record) { return true; } + if (!record->event.pressed) { + return true; + } + switch (keycode) { case KC_LSFT: case KC_RSFT: @@ -58,7 +62,7 @@ bool process_autocorrect(uint16_t keycode, keyrecord_t* record) { #endif #ifdef SWAP_HANDS_ENABLE case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX: - if (keycode >= 0x56F0 || record->event.pressed || !record->tap.count) { + if (keycode >= 0x56F0 || !record->tap.count) { return true; } keycode &= 0xFF; @@ -77,9 +81,6 @@ bool process_autocorrect(uint16_t keycode, keyrecord_t* record) { typo_buffer_size = 0; return true; } - if (!record->event.pressed) { - return true; - } } // Subtract buffer for Backspace key, reset for other non-alpha.