Spellcheck from word underlined in red without using mouse (v8.2.4)

Keyboard Maestro 8.2.4 “spellcheck from word underlined in red without using mouse” Macro

I was asked how to do this by several people and @Houston.Brown here. I use this myself. All I need to say is in the Green comment box but I will say that it is satisfying and useful to me to avoid any mouse use in several Ulysses workflows I have: helps me focus in fact.
I didn't think it was, frankly, a great time saver, it is just a few system shortcuts triggered together really. However it is supercharged if you use it with @JMichaelTX 's palette which he shows below. It upped the usefulness of the macro for me by a factor of three. It works perfectly in Ulysses and Pages. I will try to modify it at some point for LibreOffice which I also own. I can't speak for Microsoft Word.

Using @JMichaelTX 's palette with this macro supercharges it. It is a set of macros more than the sum of their parts; one of the delights of Keyboard Maestro in fact when this happens and properties emerge as it were in unexpected ways via collaboration. It should be considered a necessary part of mine.
both macros uploaded inactive.

spellcheck from word underlined in red without using mouse.kmmacros (8.8 KB)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

==UPDATED==: 2019-09-07 15:52 GMT-5

Per @tudor_eynon's request, I am adding the Macro Group Palette that I created to work with his great macro. You can, of course, adjust the hot keys for each Macro in the Palette to suit your preferences.

@tudor_eynon, this is a totally awesome macro! :+1:

I have a spellcheck macro, but it requires you to select the word, and place the mouse pointer over it.
This is infinitely better.

But I did run into one issue: It did not select the text underlined in red, in this use case:

That's OK, I understand why. My questions for you:

  1. Are the KB shortcuts for the buttons on the Spelling dialog?
  2. If not, can they be assigned?
  3. How do you navigate to the other fields on the dialog?
    • For example, after I click on "Find Next", then "infinitly" is selected, but there are several corrections available.
    • How do I choose the one I want?

last question first. Use tab and down arrow it should just go into that set of words and highlight them, tab will move you from button to button. In the example "Tudor" being highlighted, tab and down arrow would take you through the options and 'return' would effect the correction. That is how it works for me, in Ulysses mostly.

  1. What the system shortcuts do is not select buttons on the box, what the three of them do is
    a) is option + back arrow, which will take you to the start of the word that would have a red line under it if you have 'check for spelling as you type' checked in the drop down menu of Ulysses and most writing apps I know of. It is really starting a spell check thru the document from there, that is what you are really doing. Really you are starting a spell check of the whole document from that point. It would work to select 'infintly' if you trigger the macro from the gap after "infinitly' and start from there. If you type fast I find that you often get another word in before the red lines appear. In that case you are really running through the document in one direction from the cursor point minus one word (ie and Option + back arrow) if that word isn't the mispelt one it will just move forward to the next one.

b} opens the floating spell check window

c) moves focus to a floating window via system shortcut which is where some of us were stuck really. Spell check on Mac needs updating I think frankly.

  1. I don't know how to assign the buttons to anything. I think there used to be an underlined letter on some of them which would activate.

3)You can move round the box using 'down arrow'. The example you give would just require you to down arrow and the highlight should go straight into the choices you are offered. Using the tab key to go mostly from button to button: 'return' key will activate the changes. If you accidentally stick on 'check grammar' it will move if you use 'return'. I have found the "learn" button glitchy to be honest. I don't use that much in most of my workflows. I understand there are problems with that however you do it on Mohave
I do find it puzzling that the if then action I use recognizes, as far as I can tell, the button I use to trigger the reminder of how it works that I flash up. I thought Keyboard Maestro 8 couldn't see the floating windows and that was why I didn't try to assign any Keyboard Maestro actions to the buttons on the floating window.

@tudor_eynon,

OK, I think I understand how to use this now.

  1. The cursor must be just to the RIGHT of the misspelled word, to the LEFT of any other words you have typed.
  2. Once you see the misspelled, red-underlined word, if you are past one more more words to the right, then keep pressing ⌥← until you are just to the RIGHT of the misspelled word.
  3. Now trigger your macro and it will move the cursor to just before the misspelled word, and invoke the Spelling dialog.
  4. The Spell Checker looks for misspelled words to the RIGHT of the current cursor.
  5. If you are offered multiple choices for a correct spelling, the UP/DOWN arrows will let you select the one you want.
  6. Then press RETURN to replace the word.

Meanwhile, I have created a Macro Group Palette to use the buttons on the Spelling Dialog:
The Palette should automatically show and hide as the Spelling Dialog appears and then closes.
The hotkeys for the macros in the palette are ONLY active while the palette is showing.

SpellCheck Palette Macros (v9.0.1)

SpellCheck Palette Macros.kmmacros (6.5 KB)

image

image

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thanks again for a great macro.

1 Like

Those palettes were what I needed!! @JMichaelTX .

I am exited to incorporate them: I also know now how to create palettes like this which will totally tranform my own workflows. It supercharges my macro and makes it genuinely time saving too. tabbing round that floating window was slow. It also makes it worth the time, one keystroke now, to teach spell check words. I didn't before since I lose them when I do a clean instal etc.. I was just trying to help Houston and find I have transformed my own workflows by a factor.

For me this works better with the first keystroke being Cmmd + back arrow. That puts the spell check to begin at the start of the line and catches what I want pretty much always. even a repeat in the macro of the option + back arrow would work better for me. Even if it always went back two words it would catch virutally every mispelling of mine straight away. Depends on how fast one goes and how fast the red lines appear. In my own case even finished documents are full of red lines: because I use names and foreign language words that I don't bother to 'teach' the spell check.

I have found people's use of spell check to be very idiosyncratic.

I use a color scheme I saw on one of your posts. It works well. So thanks for that too as well as thse palettes.
Wow I am learning how hard it is to explain verbally idiosyncratic macros too; thanks for your clarity.

Good point. I find it even better to use ⌥⇧↑
This moves the cursor to the start of the paragraph, before the spell check is invoked, which then jumps immediately to the first misspelled word.

I believe these are the only Actions you need:

image

BTW, both ESC and ⌘W will close the Spell Checker window.

1 Like

Yeah, as one works on these they get better and better it seems. In my case the paragraph jump would work well in fact, it would catch everything. Once you have the principle in mind it seems obvious...
I am learning that. If you keep thinking about them and keeping them on the back burner. I think the system spell checker might work better for some of us than others. On my machine I can open the spell checker but the focus is still not on it after using shift + cmmd + ; I think it should be but just doesn't work for some of us.

That seems to have been the stumbling block with some others who asked me about this, nothing is more irritiating than to have a good keyboard flow and then need to reach for the mouse anyway. due to something native that won't work quite right.
I will look to modify it some for LibreOffice (Wordish). I can't get much out of it on Mellel still. It isn't really fair though as I have a very old version of that app. I don't really need spell check on it.

I will try it again though. I enjoyed this and it was good to feel this kind of collaborative element here. I learnt a lot, especially about those button actions, which really bought the macro to life in fact. We are kind of levering something out of the system. It was like when you put sails on a yacht's jibs it suddenly 'works'. It was too slow as I had it intitally before that. It has also taught me how to 'build' in a kind of modular fashion: and return to a problem even when one thinks it solved. Thanks so much for your time and encouragement.

2 Likes