Keyboard shortcuts: configure different functionality for long or short presses

You need at least BetterTouchTool version 3.766 to do this

To setup a shortcut that triggers one function on short press, and another on long press do it like this:

For Long Press:

For Short Press:

Would it be possible to create a long-press variant out of a standard shortcut without creating an infinite loop?

Currently i have cmd-alt-c as shortcut for the following:

  1. send cmd-C (to copy selected text to clopboard)
  2. execute shell script "pbpaste | /usr/local/bin/jq | pbcopy" to format JSON and put back to clipboard

It sould be awesome to execute the above via long press cmd-C.
I cannot find any other way to "copy to clipboard" than actually sending a cmd-C.

Not exactly what you want. But, how about the key sequence cmd+c+c to „copy selected text to clipboard" and "execute shell script“? No infinite loop if you record this way.

Alternatively, just use "c". But you have to set up two actions.

Short pressed, c = c, 0 - 0.2 s, enable "Prevent recursive triggers"


Long pressed, c, any action, 0.25 s or longer.

This works well if you don't write too fast.