2

Is there any way for me to get all of the words detected by the standard OS X spelling checker as mistakes, to be corrected to the first available choice using a keyboard shortcut?

E.g. I type aqcuired and several words/sentences later I look up from the keyboard and see the typo. Instead of reaching for the mouse or tediously navigating there with the keyboard for a manual correction, I'd like to just hit some key combination and get it to be fixed to the obvious correction acquired...

Any solution which is applescript based will also do, since I can easily trigger any applescript from the keyboard (using iKey).

2 Answers 2

1

I couldn't come up with anything better than this:

--delay 0.3
--activate application "TextEdit"
tell application "System Events" to tell (process 1 where frontmost is true)
    set wasshown to title of windows contains "Spelling and Grammar"
    keystroke "w" using option down
    if not wasshown then keystroke ":" using command down
    tell (window 1 where title is "Spelling and Grammar")
        delay 0.05
        try
            select row 1 of table 1 of scroll area 1
        end try
        click button "Change"
        if not wasshown then click button 1
    end tell
end tell

For the keystroke command to work, create ~/Library/Keybindings/ and save this as DefaultKeyBinding.dict:

{
    "~w" = selectWord:;
}

Other methods weren't really usable when for example the word under the caret was not underlined.

Many words don't have any suggestions. I think it's easier to just press ⌘: and retype words manually, or to press ⌘; and double-click the suggested words.

Adding changeSpelling: to DefaultKeyBinding.dict didn't seem to work.

1
  • could you provide some details on what the script and the keyBinding are supposed to do?
    – GJ.
    Commented Apr 17, 2013 at 17:05
0

On Macs with a Touch Bar, put the cursor at the end of the misspelled word. If it's close, the Touch Bar will show the correct spelling of the word. Tap the correct word in the Touch Bar to replace the misspelled word with it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .