Auto Capitalize

I have RSI issues – particularly with my left little finger from using the shift key – and I've been using Keyboard Maestro for a few weeks now to implement as many hacks as possible to reduce putting my hands into awkward positions (mainly though avoiding using 'key chords').

I run macOS, which as far as I'm aware doesn't offer a system-wide auto capitalize feature. Does anyone know if it's possible to implement some form of auto capitalization using Keyboard Maestro?

If that's not possible then I was thinking of a solution along the lines of hitting any given letter key three times creating the relevant capital letter. I know how to do this for each individual key – by setting a macro that says (for example) 'when "sss" is typed, replace it with "S"' – but I was wondering if it is possible to create one macro that would apply to all letter keys (like 'when any letter key is typed three times in a row, replace it with the capitalised version of the letter key typed).

Any help in reducing my discomfort would be most appreciated! I'm just making up solution as I go, but what I've implemented so far hasn't proven enough to fix the problem. I think the ultimate solution is never to use key chords, but that's easier said than done.

Here's one that uses typing "yy" as a trigger

Usage:
Type [letter to capitalize] followed by "yy"

Example:
typing xyy -> gives you X

Autocapitalize.kmmacros (2.9 KB)
Uploaded in a disabled state, enable it to use

1 Like

Perfect, amazing, thank you! This software is a complete game-changer.

1 Like

I've noticed three curiosities in using this macro:

  1. Within Evernote, it completely changes the formatting.
  2. Within Google Sheets, it takes you out of 'typing mode' within the cell you're in (i.e., if you were to type another word, you'd overwrite what was already in the cell).
  3. It takes a split second to process the macro, which means that if you're typing quickly, the order of the letters gets jumbled up.

Could anyone offer any solutions to one or more of the above?

In the future, please post each problem/question as a separate Topic.

How fast KM processes a macro depends on the computer CPU speed, so it might help to wait until the macro ends.

Hey @badgerer,

You're playing very complicated games with disparate systems that aren't designed to work together, so of course there are bumps in the road. Some of these can be worked around by more sophisticated use of Keyboard Maestro – some can't.

Try the Typinator demo, and see if it does a better job with your text replacements.

It should, because it's purpose-built for that task – but no bets.

I use it myself instead of Keyboard Maestro for most text replacement operations.

I make a case for “Why Typinator?” [here].

-Chris

1 Like

I'm running an older version of OS X that doesn't include the capitalization option displayed in this image:

Has that been tested? Is it insufficient in certain ways or situations?

Yep – adoption of that feature is app-specific (i.e., plenty of apps simply don't offer auto-capitalization), and it is often poorly and/or incompletely implemented in my experience.

I appreciate the suggestion @ccstone, but as far as I can tell, Typinator doesn't offer the solution I'm looking for in this instance (short of creating an abbreviation for every single capital letter).

Sure it does. Typinator like Keyboard Maestro supports regular expressions.

image

Type any letter character twice and get a capital.

Properly avoids double letters mid-word, so:

yyellow produces:

Yellow

Consecutive caps are supported.

yyeellooww produces:

YELLOW

-Chris

Hmmm, tempting to Trigger Macro With Voice Command as @kcwhat demonstrated using Dictation. The details of just how a letter or word would be capitalized would depend on your word processing application.

Or, taking the simpler approach, you could just use Dictation's “Caps” to capitalize the next word.

I've been trying this out and it definitely seems like a really good solution – thanks @ccstone!

I've noticed a couple of things:

  1. It doesn't work when trying to capitalise the first word when writing a new email in the app I use (Front for macOS). Do you have any idea why this might be?
  2. I've noticed just one undesired consequence so far: if you try to start a sentence with say "Attain" or "See" (i.e., where the second and third letters in the word are the same), you'll end up with "ATain" or "SE"). Is there a solution to this?

I really appreciate your help!

No idea.

This shouldn't be possible.

Post a screenshot of your snippet and abbreviation.

-Chris

I believe the behaviour is related to the support of consecutive caps?

No.

I don't see the behavior you describe

See produces See

attain produces attain

yyellow produces Yellow

What version of macOS are you using?

-Chris

11.2.3.

To clarify, here's what I type versus what is subsequently displayed:

ssee > SE
aattain > ATain

In terms of how you've described the functionality above (with regards to consecutive caps) it makes sense that this would happen, but it isn't desired in my case. Is there a way to turn consecutive caps off? I'm afraid I have zero familiarity with regular expressions.

Okay, I can reproduce this.

The problem is that when Typinator replaces text the regex is reset – that's why you can do consecutive caps.

I can't think of a way to do double-letter == Capital that would not have this problem.

This pattern uses three consecutive letters to equal a cap:

\b([a-z])\1{2}

You could do something like this:

(\S)(\S*)cc[[:blank:]]

{/Uppercase $1}$2

In this case the suffix “cc<space>” will capitalize the preceding string.

So:

guccicc\<space> will convert to Gucci

You can play with the regex and do all sorts of permutations.

-Chris

Great – thanks! I'm going to experiment with both approaches to see which one works better for me. I really appreciate your help!

1 Like