Pasting result of last terminal command not working in keyboard shortcut

I defined a keyboard shortcut that executes a terminal command synchronously. In the second action the result of the last terminal command should be pasted using the internal variable (BTT)@variable:BTTLastTerminalCommandResult(BTT).

This is not working. Nothing is pasted.

It used to work before my last update.

BTW: There is a small typo in the german localization "Termionalkommando"

Device information:

  • Type of Mac: MacBook Pro, 2019 (Intel)
  • macOS version: Sonoma 14.4.1
  • BetterTouchTool version: 4.477

I wonder how this worked in the past because there was a bug that should have prevented it from working even then.

It should now be fixed in 4.478 (uploading now)

Hi Andreas,

thanks for your fast bug fix! In version 4.478 it is working as expected.

Back in 2020 I created a keyboard shortcut to generate an OTP-Token for our company´s VPN - not just a random number :wink: So I just need to set the focus on the corresponding text field of the VPN-App and execute the keyboard shortcut.

I believe that I also tried the solution of this bug report at that time but I didn't get it to work. So I implemented a work around via Java Script Text Transformer:

async (clipboardContentString) => {
   let shellScript = `/usr/local/bin/oathtool --totp -b $(<~/.ssh/totp_company)`

   let shellScriptWrapper = {
      script: shellScript

   let result = await runShellScript(shellScriptWrapper);
   return result

This worked for me for the last four years. Some weeks ago I wanted to rewrite the keyboard shortcut to get rid of the JavaScript-Transformer-Hack. Once again I tried a version with the usage of the terminal command.

I believe it was working as expected but I updated BTT some hours/days (?) later. After the update it wasn´t working anymore. Maybe it was just working because I forgot to remove the JavaScript-Transformer from the paste action? I can´t reproduce it.

Maybe it would be a nice feature to support creating OTP-tokens directly in BTT?