Template: Transform Text

This is a simple template to transform text using only the keyboard.

This example uses “j” (without modifier) to make text bold, without interference when writing.

J = J.bttpreset (1.2 KB)

J = select word.bttpreset (1.3 KB)

Transform to "bold".bttpreset (5.2 KB)

J = J: types a “j” as usual when the key is pressed briefly (on key down).

J = Select Word: Selects text to the left of the cursor as long as the key is held down. You can see how the text is selected.

Transform to “bold”: Makes the selected text bold (when the key is released) and returns the cursor to the correct position to continue typing.

Note:

  • Key repeat is set to be deliberately slow so that you can see what is happening. This can of course be set as desired.
  • It makes sense to use these triggers in a CAG that only works when the cursor is in a text field.
  • For more complex text transformations, the corresponding predefined BTT action can be used, which is disabled in the transform trigger (instead of the shortcut, cmd + b).