Skip to content

Commit

Permalink
Turn off autocorrect on boring layer
Browse files Browse the repository at this point in the history
Rename autocorrect function
  • Loading branch information
plodah committed Aug 29, 2024
1 parent e0f3bef commit b9ab1de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,18 @@

#endif // RGB_MATRIX_ENABLE

bool process_autocorrect_user(uint16_t *keycode, keyrecord_t *record, uint8_t *typo_buffer_size, uint8_t *mods) {
# if defined(PLODAH_BORING_LAYER)
if( get_highest_layer(layer_state) == PLODAH_BORING_LAYER){
return false;
}
# endif // defined(PLODAH_BORING_LAYER)
return true;
}

bool apply_autocorrect(uint8_t backspaces, const char *str, char *typo, char *correct) {
# if defined(RGB_MATRIX_ENABLE)
for (uint8_t i = 0; i < backspaces; ++i) {
tap_code(KC_BSPC);
}
send_string_P(str);
plodah_autocorrect_indicator_start();
# endif // RGB_MATRIX_ENABLE
return false;
return true;
}
2 changes: 1 addition & 1 deletion users/plodah/plodah.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
// AUTOCORRECT //
//=======================//
#if defined(AUTOCORRECT_ENABLE)
# include "functions/autocorrect_indicator.c"
# include "functions/autocorrect.c"
#endif // AUTOCORRECT_ENABLE

//====================//
Expand Down

0 comments on commit b9ab1de

Please sign in to comment.