I’m constantly making the error of CApitalizing the first TWo letters of a word when I don’t want to. (I can’t remember ever wanting to, anyway.)
There’s a good discussion here of how to capitalize words when you’re typing, but does anyone think it would be possible for KM to look at every word as I type (triggered, say, when I hit ‘space’), and use a Regular Expression (maybe?) to detect this pattern – and if it happens take it away to a named clipboard, change the second letter to lower-case, and return it to the same spot?
You could do it with a regular expression trigger like this:
You might find if you type sufficiently fast that you can type a fourth character before Keyboard Maestro can correct the second character. You can possibly improve the speed by turning off the simulated deletes, and only deleting two characters and adding the two lowercase characters.
I found a small problem about this macro. For example, I don’t want to autocorrect the word “TVs”, but this macro will do. By the way, the “filter variable with Capitalize” is better in this macro.
To solve that problem, I made two macros. One is the exclusion macro, and the other is the main macro.
The Regex I use here is \b[A-Z][A-Z][a-z]+[A-Za-z]*[^A-Za-z]. These two macros will trigger after a whole word is typed and a next key (not a-z) is pressed, because I want them to check exclusion words for me.
However, I have another problem here. If I type the word “APple”, and click somewhere with my mouse, these macros will not trigger.
Do you have any idea about this, like the string can be triggered after I type a whole word or anything else?
To catch TVs, make some sort of exclusion list, like this:
No. Keyboard Maestro has no ability to help in that sort of case - you have left the field or clicked somewhere else in it, either way Keyboard Maestro cannot affect the previous location.
In fact, Keyboard Maestro knows nothing about what you are doing or where you are doing it - all it sees is what you type. Various things like clicking or changing applications clear the buffer of what keys it is looking at.
Yeah, I sympathize. My Double Caps in the Toggler Macro thread (at the bottom) works great (and has an exception list) in text editors but isn't quick enough in desktop publishing applications (generally speaking). I suppose Typinator is the solution to this.