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.