Autocorrect is now a core QMK feature! It was released on 2022-11-26. Update your QMK set up and see QMK Autocorrect. Or if you want, you may continue to use the userspace implementation described in this page.
Some words are more prone to typos than others. I have a habit of typo-ing ouput and fitler . This post describes a rudimentary autocorrection implementation that runs on your keyboard with QMK.
The animation below shows the effect as I type aparent . As I press the final t, the autocorrection feature detects the typo and automatically sends keys to correct it:
Low resource cost: for an autocorrection dictionary of 71 entries, firmware size cost is 1672 bytes and average CPU cost per key press is about 20 µs.
It works within words. It corrects fitler ed, fitler ing, and useful for programming, within longer identifiers like DesignButterworthFitler .
It is limited to alphabet characters a–z, apostrophes ', and “word breaks.” No accented or Unicode letters; I’m sorry this probably isn’t useful for languages besides English.