This macro is used to modify selected text or the clipboard text, if no text is selected. The text can be augmented* or filtered** in many ways. Here are three simple examples:
The macro has been designed to provide immediate additions (via dedicated hot keys) for those used frequently; whereas selection from two lists*** for those used less often.
*text Additions can easily be added to the 37 initially configured
**text Filters can be easily added to the 21 initially configured
***there is one Keyboard Maestro Prompt For List for text additions and one list for text filters
The following video includes four quick demonstrations of this macro: Augment or Filter Text - YouTube
SETTINGS / HOT KEYS
By default, this macro is triggered using a hyper key (⌃⌥⇧⌘), plus letter T for general use. When this hot key is pressed the a text Additions Prompt With List will appear. If one of the 37 default options is selected, the choice will be immediately applied to the text. Alternatively, if /+<return> is typed the Skip below Additions; continue to text Filters choice will dismiss the text Additions and a second Prompt With List with text Filters will appear. Here one of the 21 Filter choices can be similarly applied.
Due to the efficiency of the Keyboards Maestro Prompt With List action, any of the above 58 (37+21) text transformations can be applied to selected text with just a few keystrokes. However, for Additions that are applied frequently, there is an even better option: immediate addition with a designated hot key (a.k.a. Immediate Additions). By default, eight additional hot keys are set for eight corresponding Immediate Additions.
(In the following selected_text will be augmented with the indicated additional text.)
*If any of the eight above Immediate Additions are not needed, the hot keys can be removed from this macro.*
Refer to the comments above the two text variables local_Additions and local_Filters for more information about adding Additions, Filters, or Immediate Additions hot keys–like the eight indicated above.
• Keyboard Maestro 10.2
• Ventura 13.3.1 (22E261)/MacBookPro16,1
• Mojave 10.14.16/Macmini6,2
• High Sierra 10.13.6/iMac11,1445
( expand / collapse )
1.0 - Initial version
In the Filters section, added:
• Smart Smart Single Quotes to Dumb Single Quotes
• Reddit User Link to Reddit User
• Quoted URL to URL
The three additions to the Filter section employ regular expressions since the Keyboard Maestro Filter action does not provide these options.
2.1 - Bug fix. Delete Past Clipboard 0 should only be executed when %SystemClipboard% <> %Variable%local_SysCb%
a) Added to local_Additions corresponding to the following hot keys: Hyper+w, x, m, and f.
b) Improved this header comment.
2.3 - No change to macro functionality. Improved this header comment.
2.4 - Changed the two Prompt With List actions to Automatic Width.
a) Removed superfluous colon ( : ) from Hyper+w.
b) Corrected typographical errors in the header comment.
c) Updated TESTED WITH information.
a) Simplified the format of local_Filters.
b) Added a Filter: KM Forum User URL to @User (example conversion: Profile - _jims - Keyboard Maestro Discourse to @_jims.
a) Added a Filter: Plain Text
b) For KM Forum User URL to @User generalized the regex search to enable more conversions (e.g., Markdown links: @_jims ).
c) For Convert Double Quotes to Dumb Quotes changed from the Filter action to the Search and Replace action because there may be times when the smart quotes do not match.
d) Corrected a typo in this comment and deleted a n/a note in the comment below: Syntax Description: SETTINGS (Additions)
a) Added Titles to the two Prompt With List actions.
b) Added an option to return the the Additions from the Filters Prompt With List.
c) Added an Addition: Quote Block
d) Modified the following Additions: Folding Section (added a horizontal rule below the text), the three KM Variables (improved the PWL labels), and KM Macro Download Annotation (improved the download annotation)
e) Improved the RegEx pattern that searches the Additions (that potentially include an Immediate Action hot key). The previous version did not function as expected for the modified Folding Section and the added Quote Block. Added a comment above the RegEx pattern to explain each RegEx element.
f) Updated the TESTED WITH section.
The latest version of this macro is available on the Keyboard Maestro Forum.
Download: Augment or Filter Text.kmmacros (112 KB)
- Macros are always disabled when imported into the Keyboard Maestro Editor.
- The user must ensure the macro is enabled.
- The user must also ensure the macro's parent macro-group is enabled.
- macOS 13.3.1 (22E261)
- Keyboard Maestro v10.2