Added autocorrect feature

This commit is contained in:
2022-11-20 20:45:36 -08:00
parent afa07ce83c
commit f4a7960eed
7 changed files with 1044 additions and 2 deletions

View File

@ -8,7 +8,9 @@
// Enable spellcheck over HID
#define ENABLE_HID_SPELLCHECK
//#define ENABLE_HID_SPELLCHECK
#define ENABLE_AUTOCORRECT
// RGBLight effects
// Static color is always enabled.

View File

@ -7,6 +7,10 @@
#include "features/beta_rawhid.h"
#ifdef ENABLE_AUTOCORRECT
#include "features/autocorrect/autocorrect.h"
#endif
// Values that should not be saved to git.
// Create a `secrets.h` in the keymap directory.
//
@ -27,7 +31,6 @@ bool send_special_character(uint16_t keycode) {
return true;
}
LEADER_EXTERNS();
void leader_start(void) { ergodox_right_led_3_on(); }
void leader_end(void) { ergodox_right_led_3_off(); }
@ -67,6 +70,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!process_spellcheck(keycode, record)) { return false; }
#endif
#ifdef ENABLE_AUTOCORRECT
if (!process_autocorrection(keycode, record)) { return false; }
#endif
// Handle special chars
if (record->event.pressed) {
if (!send_special_character(keycode)) { return false; }