User Tools

Site Tools



Keyboard Maestro includes a variety of filters that can be applied to either the system clipboard, Named Clipboards, or variables. For clipboards, the filters preserve style information to whatever degree is possible. Use the Filter action to apply filters.

The filters are:

  • Remove Styles (ie, make the clipboard plain text – not applicable to variables).
  • Set line endings to Mac, Unix or Windows/DOS.
  • Trim Whitespace.
  • Hard wrap or unwrap paragraphs.
  • Lowercase (all characters), Lowercase First (just the first character).
  • Uppercase (all characters), Uppercase First (just the first character).
  • Capitalize (all words) or Title Case (intelligently uppercase certain first letters).
  • Change quotes to Smart, Dumb or French quotation marks.
  • Encode HTML or non-ASCII HTML entities.
  • Decode HTML entities.
  • Generate an HTML list.
  • Percent Encode or Decode a URL.
  • Quote for AppleScript, JavaScript, Shell (bash) Script, or Swift.
  • Convert a JSON object string to Compact or Pretty format (v9.0+).
  • Get the filename component of a path.
  • Get parent of a path.
  • Get the basename of the path (ie the name without directory or extension).
  • Get or delete the path extension.
  • Get the display name of a path.
  • Expand tilde (~) paths, or abbreviate with a tilde.
  • Resolve symlinks, or standardize the path.
  • Delete or bullet (•) control characters.
  • Calculate an expression and return the result, see the Calculations section.
  • Process Text Tokens and return the result, see the Tokens section.
  • Get the value of a named variable or named clipboard.
  • Count the characters, words or lines and return the result.

We will likely expand the list of possible filters, so if you have specific filtering needs that you think might be of general interest, please let us know. In the mean time, remember that you can apply scripted filters using an AppleScript or shell script, for example the shell script:

pbpaste | perl -pe 'tr/A-Z/a-z/' | pbcopy

is roughly equivalent to the Lowercase filter, except that it only works with ASCII characters.

manual/Filters.txt · Last modified: 2019/06/24 23:27 by peternlewis