Skip to content

Commit

Permalink
move pressed processing
Browse files Browse the repository at this point in the history
  • Loading branch information
drashna committed Feb 4, 2022
1 parent ffdafbf commit c6d1488
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions quantum/process_keycode/process_autocorrect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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;
Expand All @@ -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.
Expand Down

0 comments on commit c6d1488

Please sign in to comment.