Javascripts for text transformations I can use in BetterTouchTool?

Hi. I just spent several hours getting part way through setting up a Floating Menu to run 14 or so Keyboard Maestro text-transformations that use Keyboard Maestro’s built-in “filters” to change the clipboard content in useful straightforward ways such as capitalize, change case, sort lines, calculate, etc. These work well, and the Floating Menu is useful. :+1: .

I notice that I could have done this with BetterTouchTool’s built-in Actions that execute “Clipboard Transformer Functions” written in Javascript. My programming ends at “copy, paste … hope”.

Is there a group of simple Javascript “Transformer Functions” available?

I suggest considering including a set of these with BetterTouchTool, or making them available for download separately if they aren’t already.

Floating Menu:

… with pop-up Floating Menu Mini-menus:

Recently someone posted a few here: Text Case Converting Keyboard Shortcuts

For custom text transformer functions chatgpt etc. are perfect, if you give them a prompt with an example like this:

Example prompt
I have this java script function that transforms some input string to upper case. Please change the function to transform the input string to mixed case like this: "tHiS iS a TeSt". Please keep the variable names the same:
async (clipboardContentString) => {
//example
return clipboardContentString.toUpperCase()
}

This will usually create pretty perfect java script to achieve the goal

1 Like