Autocorrect
Autocorrect fixes your own common misspellings. It recognizes a listed word when you finish typing it,
erases it and types its correction in its place: type qzx and a space, and the program receives "quartz"
and the space. It works in any program that takes typed text.
The examples on this page use made-up words such as qzx; your list can hold words in any language that is
written with spaces between words.
Autocorrect is off until you turn it on, and its list starts empty: Input.Observer doesn't ship a list of misspellings. Import one you already have (a word list, or an AutoHotkey script of corrections), or add your own words one at a time.
The Autocorrect page is in the AUTOMATION section, right after Text expansion, in Simple and Advanced mode alike. Its header shows how many corrections the list holds.
Turn it on and add corrections
| Typo | Correction |
|---|---|
| qzx | quartz |
| vbq | velvet |
| rnr | rock'n'roll |
| rck'n'rll | rock'n'roll |
- Open Autocorrect and turn on Autocorrect enabled ①.
- Choose Import… ② to bring in a list (Importing a list), or Add row ③ to add one correction: a new empty row appears at the top of the list. Type the misspelling under Typo and what it should become under Correction.
- Choose Apply in the save bar.
The search box ④ shows only the rows whose typo or correction contains what you type, ignoring case. It filters a moment after you stop typing; Enter filters at once.
To edit a row, double-click a cell or select it and start typing. To remove rows, select them (Ctrl+click and Shift+click select several) and choose Delete or press Delete; the list keeps its place, and the row after the ones you removed is selected. Clear all… empties the list after asking, and so does deleting every row at once (Ctrl+A, then Delete). Until you apply, Discard brings back everything you removed.
The Autocorrect enabled switch is separate from text expansion's: Text expansion enabled doesn't turn autocorrect on or off, and this switch doesn't affect text expansion.
Rows that can't be saved
A row that can't be a correction is marked as not valid (a dot at its start and a tinted row), and Apply can't save your changes until you fix or delete it. To see why, point at the dot, or select the row: the line under the list says why, and a screen reader reads it with the row's cells. A row is not valid when:
- the typo isn't one word: it holds a space, a hyphen, a period or anything else that isn't a letter, or an apostrophe that isn't between two letters (What counts as a word);
- the typo is a single character. A typo needs at least two, since a one-letter word is never corrected;
- the typo holds a digit. A word with a digit in it is never corrected, so a list can't hold one;
- the typo is longer than 64 characters, or the correction longer than 256;
- the correction is empty;
- the correction is the same as the typo;
- the same typo is listed twice (both rows are marked; delete one);
- the list already holds 100,000 corrections: the rows added last are the ones marked.
An empty row (both cells blank) is never saved and never blocks Apply.
The whole list can be at most 8 MB as a file. Past that, Apply says the list is too large and saves nothing until you delete some rows.
What counts as a word
A word is a run of letters, typed one after another. Autocorrect looks a word up only when it ends:
- Letters of every script count: Latin, Cyrillic, Greek, Arabic, Hebrew and the others. An accent typed as a separate mark stays part of its letter.
- An apostrophe between two letters is part of the word, so
rnr→rock'n'rollworks, andrck'n'rllcan itself be a typo. An apostrophe with no letter after it ends the word:qzx'correctsqzx. Both the straight (') and the curly (’) apostrophe count. - Digits. A digit joins the word, and a word with a digit in it is never corrected.
mp3andh2oare left alone, and so areqzx2and2qzx. - Everything else ends the word: Space, Tab and Enter, and every other character that isn't a letter or a
digit — punctuation, hyphens, slashes, brackets, quotes,
@and_. The word before it is checked on its own, so(qzxandqzx:are corrected, and invelvet-qzxtheqzxis. - The character that ended the word is always typed after the correction:
qzx,gives "quartz,". - Enter and Tab correct the word too. Turn off Correct at Enter or Correct at Tab on the Settings tab, and that key ends the word without correcting it: useful where Enter sends a message straight away, or Tab moves between the fields of a form.
- Backspace removes the last letter of the word you're typing, so a word you fix as you type
(
vbx, Backspace,q) is still checked asvbq. A Backspace past the start of the word goes into the word before it. Erase that one back to where it began, and the word you type in its place is checked as usual:vbxand four Backspaces, thenqzx, gives "quartz ". Type a letter before getting there, and it continues the word in front of it, which isn't corrected. Backspace into a second word back, or into a word that ended with Enter or Tab, starts over.
What you've typed of a word is forgotten, with nothing corrected, when you press an arrow key, Home, End, Escape, a function key or any key that doesn't type a character; when you press a key while Ctrl, Alt or Win is held; when you click; and when you switch to another window or field. Focus moving between fields inside one window, as on a web page, doesn't count unless Start over when focus moves inside a window is on (off by default; the suggestion lists of address bars move that focus as you type). An editor's own completion list, such as Notepad++'s, never counts as a move: the keys still go to the editor. The setting is on the Settings tab here and on the Text expansion page, and applies to both.
After one of those, the first word you type isn't corrected until a space or punctuation has been typed. Autocorrect checks a word only when it knows where the word started, and after a click, an arrow key or a window change the text before the cursor could be the start of a longer word. From the next space or punctuation on, words are corrected as usual.
To have that first word corrected too, for example a word typed at the start of a browser's address bar, turn
on Correct the first word after a click on the Settings tab. Autocorrect still can't see the text before
the cursor, so a typo typed right after an existing letter is corrected as well: after an x, typing qzx and
a space gives "xquartz ".
Some characters can't be part of a listed word:
- Characters outside the Basic Multilingual Plane, such as emoji and the letters of a few historic scripts, end a word.
- A character typed with AltGr or a dead key (an accent key that waits for the next letter) makes the word start over, so a word containing one is never corrected.
Capitalization
Follow capitalization (on the Settings tab, on by default) corrects two more ways of typing a typo, and
capitalizes the correction the same way. With qzx → quartz:
| You type | Result |
|---|---|
qzx | quartz |
Qzx | Quartz: the first letter is capitalized, the rest as listed. |
QZX | QUARTZ |
qZx | Nothing: only these three forms are corrected. |
"First letter" means the first character that has a capital form. Capitals follow the rules of your Windows language and region settings. With Follow capitalization off, a typo is corrected only when you type it exactly as listed.
A typo listed with its own capital, such as Qzx → Quasar, wins over another row's capitalized form: typing
Qzx then gives "Quasar".
Undo with Backspace
With Undo with Backspace on (the default, on the Settings tab), pressing Backspace right after a
correction puts back what you typed and removes the character that ended the word, as Backspace does:
qzx Space → "quartz " → Backspace → "qzx", with the cursor right after it. Type a space or punctuation there
and the word stays as you typed it. It undoes that one correction only: type qzx again, or change or erase the
word and type it again, and it is corrected again. A word you never want corrected belongs off the list: delete
its row.
- Not after Enter or Tab. Enter may already have sent a message, and Tab may have moved to another field, so a Backspace there would land in the wrong place. After those, Backspace is an ordinary Backspace.
- Keep the ending character on undo (off by default) puts the space or punctuation back too: "quartz " → Backspace → "qzx ".
- Only the first Backspace undoes. A second one deletes as usual.
- Only right after. Any other key, a click, a switch to another window or 10 seconds passing, and Backspace deletes as usual again.
Typed or pasted
A correction replaces only what differs from what you typed: the letters the typo and its correction start
with stay, and the rest is erased and typed again. qzx → quartz keeps the q, erases zx and types uartz.
Each erased and typed character waits Typing delay on the Scripts page (Advanced mode; 30 ms by
default), so a long correction takes a moment.
Paste corrections (on the Settings tab, off by default) puts the correction on the clipboard and pastes it with Ctrl+V instead of typing it, which is faster for a long one. The correction is kept out of the Windows clipboard history (Win+V). A program that doesn't paste with Ctrl+V belongs in Excluded apps.
- Restore the clipboard (on by default) puts back what was on the clipboard after the paste. When corrections come one right after another, what you had before the first one goes back after the last. If you copy something in the meantime, your copy is kept and nothing is put back.
- Restore after (150 ms by default, up to 5000 ms) is how long the clipboard waits, once the program has taken the paste, before it goes back. If a program still pastes what you had copied instead of the correction, raise it.
- When the program doesn't take the paste within a second, or the clipboard is busy with another program, the correction is typed instead. The erased letters are never left missing.
- Only the program you're typing in gets the correction from the clipboard. Clipboard managers and remote desktop tools that copy everything get nothing before it has taken the paste.
Text expansion comes first
When the key that ends a word also completes a text expansion that runs in that window,
the text expansion runs and the word isn't corrected: with a text expansion whose typed text is qzx, typing
qzx and a space runs the text expansion instead of giving "quartz". The list marks a typo that is also the typed text of an
enabled text expansion with a dot (point at it for the reason), and the page says that text expansion takes
those words.
The two don't end words in quite the same way: a ; or : ends a word for autocorrect, but can be part of a
text expansion's typed text. When a text expansion has nothing to run in that window, autocorrect may still
correct the word.
Where it doesn't correct
Excluded apps on the Settings tab lists the programs autocorrect leaves alone. It starts with common
password managers and terminals: KeePass, KeePassXC, 1Password, Bitwarden, Windows Terminal, the classic
console (conhost.exe and cmd.exe), PowerShell, mintty and PuTTY.
- Add a program by typing its file name, such as
notepad.exe, and choosing Add. Or press and hold the magnifier button beside it, then release it over the program's window. Names are compared ignoring case. - Remove one with the × on its chip. Restore the default list puts the starting list back.
- An empty list is fine: then autocorrect works in every program.
Ignore groups apply too: nothing is corrected in a window an ignore group takes over.
Password fields
Autocorrect must not change a password, but Input.Observer can't recognize every password field:
- Recognized and left alone: the classic Windows password box, as in many dialogs, installers and older programs.
- Not recognized: password fields in web browsers, and in many modern programs (those built with WPF, WinUI or the Microsoft Store's app model, and Electron apps). A listed typo typed in one of these is corrected, just as in any other field.
What keeps this rare: a word with a digit in it is never corrected, and most passwords hold one; the excluded apps start with the common password managers; and you can add any program whose password fields matter to you. Nothing typed on the Windows sign-in screen or in a User Account Control prompt reaches Input.Observer at all.
Languages and input methods
Autocorrect suits languages written with spaces between words. Right-to-left languages such as Arabic and Hebrew work like any other; the Arabic comma and question mark end a word.
- With a Japanese, Chinese or Korean input method open, nothing is corrected. What reaches Input.Observer then is what you type into the input method (romaji, pinyin, single Hangul letters), not the text it produces, and Space belongs to the input method.
- Chinese, Japanese, Thai, Lao, Khmer and Burmese are written without spaces between words, so a word practically never ends where autocorrect looks.
- Korean is written with spaces, but its syllables are put together by the input method and never reach autocorrect as typed. A typo in Chinese, Japanese or Korean characters does nothing; the list marks it and the page says so.
Importing a list
Import… opens a file, then shows what importing it would do: how many typos are new, how many are already listed with a different correction, how many are already listed as they are, and how many lines were skipped (with the first few line numbers). Then choose:
- Merge with the list (the default): new typos are added, and a typo already listed takes the file's correction;
- Replace the list: the list becomes the file's corrections, and the dialog says how many of your current typos would go.
Nothing is saved until you choose Apply. A file larger than 8 MB isn't read. Two kinds of file are read,
told apart by their content: a file is read as an AutoHotkey script when more of its lines are hotstrings than
word-list lines, and a .ahk or .ah2 file always is.
Files are read as UTF-8. A file that isn't UTF-8 and has no UTF-8 characters in it is read in your Windows code page instead, as AutoHotkey v1 reads a script saved without a byte-order mark, and the summary says so; check that its accented letters look right after importing. In any other file, a line that isn't UTF-8 is skipped.
A word list
The list's own format, which Export… writes too:
- plain text in UTF-8 (a byte-order mark is fine);
- one correction per line: the typo, a Tab, then the correction;
- blank lines and lines starting with
#are ignored; - a line that breaks a rule in Rows that can't be saved, has no Tab, or isn't UTF-8 is skipped;
- when a typo is listed twice, the last line wins.
# My corrections
qzx quartz
vbq velvet
rnr rock'n'roll
An AutoHotkey script
The hotstrings of an AutoHotkey script (.ahk or .ah2), such as an AutoCorrect script, become corrections:
::typo::correctionand:options:typo::correctionlines are read, such as::qzx::quartzand:*:vbq::velvet. Every other line (code, comments, directives, hotkeys) is ignored and counted as "not a hotstring".- A hotstring with the
Xoption (runs code) orB0(doesn't erase what you typed) is skipped. As in AutoHotkey, a later option turns an earlier one off again:X0andBdon't skip. Every other option is dropped, so the hotstring becomes an ordinary whole-word correction. - Without the
TorRoption, a correction holding{,},^,!,+or#is skipped, because AutoHotkey would send those as keys. - A replacement that continues over several lines (a section in parentheses below the hotstring, with or without text on the hotstring's own line), or a hotstring with code below it instead of a replacement, is skipped.
- A correction with a backtick escape for a tab or a line break (
`t,`n,`r) is skipped. The other backtick escapes are read as the character they stand for, and a;comment after a space is dropped.
Exporting
Export… saves the list as a word list (A word list), named autocorrect.txt unless you choose
another name. Rows that aren't valid are left out, and the page says how many.
Where the list is kept
The list is its own file, autocorrect.txt, beside config.toml in your configuration folder
(The configuration file), in the word-list format above, so you can back it up or
edit it yourself. A missing file is an empty list. Apply saves it together with the configuration, and only
when the rows changed: an edit you undo by hand, or an Apply of other pages, leaves a file you edited
yourself as it is, comments included.
- Lines the engine can't use in a file edited by hand are skipped, and the engine notes say how many and the first line number. Saving the list from this page writes only valid lines.
- With a password set, the list is protected along with the configuration (Security), since it shows what you type.
- Reload Config in the tray menu reads
autocorrect.txtagain when it is plain text. When the list is protected and the configuration file isn't, Reload Config keeps the list already loaded; Apply in this window, or a restart, picks up the new one.
Two banners make the page read-only:
- The engine needs an update: the running engine is an older version that can't share the list. The page is read-only until Input.Observer is updated, and Apply saves everything else. Changes you made to the list before the engine was replaced stay unsaved; Discard drops them.
- The autocorrect list can't be read: the engine couldn't read
autocorrect.txt, because it is protected with another password, larger than 8 MB, or damaged. Everything else in the window works as usual.