From fb29c0ae53e32fb049516fcbe0f7863882ca9173 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 17 Sep 2022 00:50:54 -0700 Subject: [Core] Add getreuer's Autocorrect feature to core (#15699) Co-authored-by: Albert Y <76888457+filterpaper@users.noreply.github.com> --- quantum/process_keycode/process_autocorrect.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 quantum/process_keycode/process_autocorrect.h (limited to 'quantum/process_keycode/process_autocorrect.h') diff --git a/quantum/process_keycode/process_autocorrect.h b/quantum/process_keycode/process_autocorrect.h new file mode 100644 index 0000000000..c7596107e5 --- /dev/null +++ b/quantum/process_keycode/process_autocorrect.h @@ -0,0 +1,17 @@ +// Copyright 2021 Google LLC +// Copyright 2021 @filterpaper +// SPDX-License-Identifier: Apache-2.0 +// Original source: https://getreuer.info/posts/keyboards/autocorrection + +#pragma once + +#include "quantum.h" + +bool process_autocorrect(uint16_t keycode, keyrecord_t *record); +bool process_autocorrect_user(uint16_t *keycode, keyrecord_t *record, uint8_t *typo_buffer_size, uint8_t *mods); +bool apply_autocorrect(uint8_t backspaces, const char *str); + +bool autocorrect_is_enabled(void); +void autocorrect_enable(void); +void autocorrect_disable(void); +void autocorrect_toggle(void); -- cgit v1.2.3