Failure to Run "Shortcuts" that Control the Home + Other Weirdness

Describe the bug
This one is a little complicated to explain, but I'll try my best:

Type: TouchBar Trigger
Action: Runs a Shortcut that controls my home (sets a scene)
Result: :x: (shortcut does not run)
Live view: :white_check_mark:

Troubleshooting 1
Type: Keyboard Trigger, multi-key (ctrl+shift+`)
Action: Runs a Shortcut that controls my home (sets a scene)
Result: :x: (shortcut does not run)
Live view: :x: (fails to detect activation)

Troubleshooting 2
Type: Keyboard Trigger, single key (`)
Action: Runs a Shortcut that controls my home (sets a scene)
Result: :x: (shortcut does not run)
Live view: :white_check_mark:

Troubleshooting 3
Type: Keyboard Trigger, multi-key (ctrl+shift+`)
Action: Various tests with actions that do not control the home (e.g. A shortcut that texts the last image)
Result: :white_check_mark:
Live view: :white_check_mark:

Troubleshooting 4
Type: Keyboard Trigger, multi-key (ctrl+shift+`)
Action: Runs an action sequence with a series of key+mouse presses and text pasting
Result: :white_check_mark:
Live view: :white_check_mark:

...and then... they all stopped working. Tests that were successful previously (as detailed above) ceased to work. Even selecting actions like "Show HUD Overlay" weren't successful. To restore functionality (to the extent described above) I had to delete the trigger and create a new one. Almost as if that individual trigger had become corrupted. It's important to emphasize that recreating the trigger did not fix the main issue (which appears to involve Shortcuts that control the home and a few other things)

Anyway... I hate this bug. Very exhausting to troubleshoot.

Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):
Tested on TouchBar and KeyBoard triggers.

Also saw this bug happen a couple of times. This text appears right after selecting "Run Shortcuts from Shortcuts App" (i.e., when selecting the action, before selecting the shortcut)

Device information:

  • Type of Mac: Macbook Pro 2021 16" M1 Max
  • macOS version: 14.2
  • BetterTouchTool version: 4.353

Additional information (e.g. crash logs, related issues, etc.):

On a unrelated note, I just like to point out that here on the forums if the user:
1.) Begins to create a new topic
2.) Selects a template-less category (e.g. Feature Request)
3.) Begins typing out their thread
4.) Switches to a category with a template (e.g. Bug Reports)
... then the template will not activate. Perhaps this is the reason that many bug reports don't have the template.

Thank you !

do your home control shortcuts maybe contain special characters or emoji?

It doesn't.

can you try whether they work when directly calling them either via terminal or via apple script?

shortcuts run theShortcutName

Apple Script
tell application "Shortcuts Events" to run the shortcut named "theShortcutName"

This is essentially what BTT does, but maybe something happens inbetween

As far as the TouchBar trigger (the first one that is my actual intended use) I do call it using Apple Script. I no longer have a TouchBar MacBook, but I continue using the TouchBar section to create triggers to call by UUID

Oh, and one more thing, I also experienced a crash (twice) the very first time I tried setting up the original trigger. Here’s how:

  • Set up trigger in TouchBar section
  • Call trigger using UUID (nothing happens)
  • Create new trigger in keyboard section
  • Try and select “Run Shortcut” as an action = CRASH.

I have the crash report if you want to take a look.

And additionally, things I tried before creating this post:

  • Removing BTT From accessibility pane and adding it back.
  • Reinstalling BTT.

what I meant: if the Shortcuts also don't work correctly when being called via Terminal or Apple Script, then it is a bug in the macOS Shortcuts implementation and most likely out of BTT's control (as these are the only two mechanisms to call Shortcuts)

In general I don't think it can be related to Home control actions in general as the mechanism for calling these is the same (I'm also using various such to control heating and lights). There is probably something else that is special about your Home control Shortcuts/triggers.

My apologies Andreas! Your previous message was completely clear and I don't how I managed to interpret it so wrongly.

Anyway, upon reading again and checking my shortcuts, I realized what the problem was. Part of my shortcuts name used quotations "", as you can see:

Screenshot 2023-12-22 at 19.28.26

I tested and indeed if I remove the quotations and relink it in BTT it does work. BTT itself does not even show the quotations in the shortcut name.

I don't suppose this is a bug, but rather a limitation? Anyway, it is very minor and easy to get around, I really don't mind.

Also, sorry about the delay in getting back to you. Thank you so much for the help!

ah, that is definitely a bug! I‘ll check whether there is a way to escape the quotes.

The quote issue should be fixed in 4.363 alpha!

1 Like

Indeed, it is fixed! You're the man :sunglasses:. Thank you.