diff options
author | Ryan <fauxpark@gmail.com> | 2023-01-30 14:37:02 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-30 03:37:02 +0000 |
commit | 2c878b1b161ae10332fdc4d69f3d1f86d2726c5c (patch) | |
tree | 2a2650ac6247497ee0804c0359841d4aa22b039f /docs | |
parent | 328279ac592bcb61fcc12097287a75bfaa5e7a3d (diff) |
Clean up `qmk generate-autocorrect-data` (#19710)
Diffstat (limited to 'docs')
-rw-r--r-- | docs/feature_autocorrect.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/feature_autocorrect.md b/docs/feature_autocorrect.md index e042027c0f..aa8d37817d 100644 --- a/docs/feature_autocorrect.md +++ b/docs/feature_autocorrect.md @@ -86,7 +86,7 @@ The `qmk generate-autocorrect-data` commands can make an effort to check for ent ## Overriding Autocorrect -Occasionally you might actually want to type a typo (for instance, while editing autocorrection_dict.txt) without being autocorrected. There are a couple of ways to do this: +Occasionally you might actually want to type a typo (for instance, while editing autocorrect_dict.txt) without being autocorrected. There are a couple of ways to do this: 1. Begin typing the typo. 2. Before typing the last letter, press and release the Ctrl or Alt key. @@ -238,13 +238,13 @@ bool apply_autocorrect(uint8_t backspaces, const char *str) { ## Appendix: Trie binary data format :id=appendix -This section details how the trie is serialized to byte data in autocorrection_data. You don’t need to care about this to use this autocorrection implementation. But it is documented for the record in case anyone is interested in modifying the implementation, or just curious how it works. +This section details how the trie is serialized to byte data in autocorrect_data. You don’t need to care about this to use this autocorrection implementation. But it is documented for the record in case anyone is interested in modifying the implementation, or just curious how it works. What I did here is fairly arbitrary, but it is simple to decode and gets the job done. ### Encoding :id=encoding -All autocorrection data is stored in a single flat array autocorrection_data. Each trie node is associated with a byte offset into this array, where data for that node is encoded, beginning with root at offset 0. There are three kinds of nodes. The highest two bits of the first byte of the node indicate what kind: +All autocorrection data is stored in a single flat array autocorrect_data. Each trie node is associated with a byte offset into this array, where data for that node is encoded, beginning with root at offset 0. There are three kinds of nodes. The highest two bits of the first byte of the node indicate what kind: * 00 ⇒ chain node: a trie node with a single child. * 01 ⇒ branching node: a trie node with multiple children. |