2022-09-17 09:50:54 +02:00
|
|
|
// Copyright 2021 Google LLC
|
|
|
|
// Copyright 2021 @filterpaper
|
2023-07-07 16:13:15 +02:00
|
|
|
// Copyright 2023 Pablo Martinez (@elpekenin) <elpekenin@elpekenin.dev>
|
2022-09-17 09:50:54 +02:00
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// Original source: https://getreuer.info/posts/keyboards/autocorrection
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-07-11 09:07:24 +02:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "action.h"
|
2022-09-17 09:50:54 +02:00
|
|
|
|
|
|
|
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);
|
2023-06-04 03:11:54 +02:00
|
|
|
bool process_autocorrect_default_handler(uint16_t *keycode, keyrecord_t *record, uint8_t *typo_buffer_size, uint8_t *mods);
|
2023-07-07 16:13:15 +02:00
|
|
|
bool apply_autocorrect(uint8_t backspaces, const char *str, char *typo, char *correct);
|
2022-09-17 09:50:54 +02:00
|
|
|
|
|
|
|
bool autocorrect_is_enabled(void);
|
|
|
|
void autocorrect_enable(void);
|
|
|
|
void autocorrect_disable(void);
|
|
|
|
void autocorrect_toggle(void);
|