Text Expansion

Generally, for serious text expansion, we recommend using a tool like TextExpander, Typinator or TypeIt4Me, but Keyboard Maestro does include some solid text expansion abilities if your needs are fairly modest.

Here are a couple examples showing some of the more advanced text expansion capabilities of Keyboard Maestro. You can have Keyboard Maestro's Typed String trigger only work immediately after a word break, and you can have Keyboard Maestro match the typing of any Insert Text action to the case of the typed string, for example:

c't -> can't
C't -> Can't
C'T -> CAN'T
sec't -> sec't (not matched)

An alternative that you can use in some cases, which makes for slightly less typing and therefore slightly faster operation, is to control the deleting yourself, deleting only the parts of the typed string that have changed (which often does not include that first optionally capitalised letter), for example:

In this case, you simply avoid deleting the first character and do the insertion of the remainder yourself. Note that this will not handle the all capitals case (C'T -> CAN'T), and you cannot use case affects actions because it would capitalise the "a" so that C't would become CAn't.

If you want some real fun, try out the regular expression Typed String option, so that you can do something like "lorem453!" and have it expand to 453 characters of lorem ipsum text. But that is a topic for another day.

2 Likes