StreamDesk+BetterTouchTool. Because I needed another rabbit hole

I am about 1/2 way through David’s video on the controlled the StreamDeck using Better Touch Tool. Since I have BetterTouchTool (BTT) and a StreamDeck XL (SD), i thought…why not? And so it begins.

Herein my first experiment. I’m sure many folks here are much further along on their exploration than I, so please jump in with suggestions and advice! (Yes, I know there is a BTT community as well, but I haven’t seem much there about the SD as of yet, and anyway here is where I hang out, so…)

—-

Like I suspect most people with an SD, I have a number of profiles set up, each activated by the SD software when a particular application is active, and one more “generic” profile used when none of those applications is active.

One of my bugaboos with the SD software is that, as far as I have been able to determine, there isn’t a way to have one profile load a configuration from another. In other words, there are some buttons that I want set up the same way on every profile, while others are application specific. Ideally I could create a set of these more general buttons and then have every other profile load those buttons. Since that doesn’t seem to be an option, I created a profile with these ‘universal” buttons, which I then select, duplicate, and rename when I want to create a new profile, and then add in the application specific buttons to the new profile. However, unlike loading a “sub profile,” if you will, if I want to change the operation of one of these universal buttons later, I need to go into each profile and make the change one by one.

I thought perhaps with BTT I could emulate my application-specific buttons and create a universal set as well.

My experiment to see how this might work in BTT ran thusly:

  1. Under “All Apps”: I created a button assigned to Row 1 Column 1 (R1C1), Just a button, green in color. No actions assigned for this test run.
  2. Restarted BTT to let it take over the SD. Green button appears in R1C1. Nice.
  3. Under my “Finder” app specific BTT settings, created a button assigned to R2C1, colored red. Switched to Finder. The green button remained in R1C1, and now the red button appeared in R2C1. Switched to Safari. Green button still in R1C1; red button gone from R2C2. Really nice. Seems to work the way I wanted.
  4. What happens if I dont’t want the “universal” buttons for a specific app? Does application specific settings override the All Apps settings? Well…
  5. Under the “Finder” specific settings, create a button assigned to R1C1. Color this one blue.
  6. Switch to Finder. Now, the red button appears in R2C1 as expected. But, the original green button is still in R1C1. Where’s my blue button from the Finder specific configuration?
  7. Interesting. In the bottom right hand corner of the SD (R4C8) its a rightward pointing arrow. I didn’t create that!
  8. Click it. Now I have my Finder-specific blue button in R1C1 replacing the All Apps green button. Sort of OK.
  9. But, my Finder specific red button that was in R2C1 is gone! And, now there’s a new leftward pointing arrow in R4C7. Click that, and back to the green R1C1 and red R2C2.

I bit curious, and not exactly what I expected or was hoping for. It seems that at this point, at least, you can create “universal” buttons in All Apps and add in more buttons that are app specific as well, but the behavior if an app specific setting conflicts with an All Apps setting is not intuitive or, at least for me, useful.

Since this part of BTT is still in beta, this may or may not change, and I expect some glitchiness in beta software. Still, pretty impressive what my first experiments have indicated are possible in BTT.

Next experiment: What if I create a folder and put some buttons in there? I’m not sure what behavior to expect, so I will experiment with that. In the SD software, I do create folders, which with the SD software allow you to click a button to have a new configuration come up, and I use that for example to have a button on most profiles where I can click that button have have a full array of window positioning options. I wonder if folders is the way to reproduce that behavior, or do I need to use the custom trigger pseudo-apps as described in the video to do this?

I hope there are some other folks exploring the SD+BTT warren who can chime in!

3 Likes

So, it seems that BTT really nailed the way it handles “folders,” or what BTT apparently calls Groups.

In my All Apps StreamDeck section, I created a group. This put a button on my SD with a folder icon. It was easy enough to change the icon to a stylized window graphic obtained from the SF Symbols library.

Opening the group showed that BTT had created a button with a stylized “X” on it, which had a preconfigured action to close the group.

Testing this out revealed that clicking on the Group / Folder button (with my windows icon on it) opened the group, and clicking the “X” button returned me to the main layout.

I created an array of buttons in the Group that control window positioning. A screenshot from the SD Emulator window in BTT shows:

I don’t know if this layout will be the final arrangement or not, but it’s pretty easy to see how I can use the built-in window positioning in BTT to move windows to corners, top and bottom and left and right halfs, thirds, two thirds, and between screen. I moved the “X” button to the lower right hand corner.

Testing this out shows that it all works perfectly, and is very convenient.

Looks like I’m a convert to using BTT to control my SD. It will take some time to recreate my SD layouts in BTT, however. Many of them are tied to Keyboard Maestro macros, which I initially invoked in the SD software via the KMLINK plug in, but then moved to using URL triggers instead. I would assume that BTT also supports opening URLs directly and can thereby invoke KMMs easily enough. I guess I not I’ll have to tie buttons to AppleScripts.

This is starting to look like my blog…

Turns out that for each specific application that you set up in BTT, in the SD section there is a checkbox that allows you to specify if the global shortcuts are active or not, so you CAN control whether the All Apps BTT buttons appear for a specific app. Very handy.

1 Like

I also found that using the Open URL action with a Keyboard Maestro URL (kmtrigger://…) does not seem to work in BTT, although it does in the SD software. I may be doing something wrong.

Instead I just use an AppleScript action with `tell application “Keyboard Maestro Engine” to do script " and it works just fine. It’s easy to get the proper AppleScript syntax from KM.

I startet to have a look into using BTT for that yesterday, too.
I selected to use the Plug-In for the Moment, as I do not want to start over completely but rather giving it a slowly increasing chance, BUT I just run into my first issue, as SD is not reaction anymore on the App I use, so it is not switching by itself to the right SD-Side.

I haven’t found a setting to overrule that, and the BTT documentation is also not working very well, so I switched it off again.

Good stuff! I really like the idea of using a BTT Streamdeck folder for window management. I’m all over the place on this, using Moom (with Bunch) and Raycast mainly. I want to settle on something and just go with it. This is indeed the golden age (thus far) of automation, but you can get into a do loop trying to figure out which works best.

Generally, I have concluded that using BTT’s StreamDeck functionality is going to work better for me than using the native StreamDeck app. Much easier to set up and more powerful, in my opinion. I do miss app specific screens, however. I think there’s a way to do this in the BTT functionality, but it does not look as simple as the StreamDeck app’s way of doing it.

@Gwhizkids If what you are looking for is application specific StreamDeck button layouts, so that the StreamDeck changes to that layout when you make a given application active, that is actually quite easy to do.

In the BTT configuration interface, you have in the left-most column, at the top, the category “All Apps”. Anything you create in BTT under this category will apply to any app (no surprise there).

If you click the ‘+’ button at the bottom left corner of that column, you can add a specific app (either selecting from the file system or from a list of currently running apps) and that app will appear in the column. When you click on that app’s name, you are now creating BTT items that are only active within that one app. If you create StreamDeck buttons, then when that app becomes active, those buttons will appear on your SD and override any buttons creating in “All Apps” that conflict (eg, what I have seen is that if I assign to a specific button in “All Apps” and also in a specific app, the specific app configuration overrides the All Apps configuration.

This gives the same sort of functionality that you can get in the StreamDeck software by assigning a layout to a specific app.

Now another cool thing, which I put together last night (I suppose I should have just started a blog instead of using this discussion as my blog for BTT/SD experiementation!) is using a “conditional activation group,” which is the third item in the popup when you click that ‘+’ button in the applications list.

A conditional activate group allows you to create a group of BTT actions that are only available when a specific set of conditions (that you specify) are met. There are quite a few conditions that you can specify, and I haven’t delved into this in great detail. This was discussed in David’s recent video cast on BTT and the SD, btw, but at the time I wasn’t quite sure how I would want to use them.

In any case, my Finder SD configuration has a grid of 9 buttons that used for adding tags to files, for tags that I frequently use (eg 2023, taxes, my name, family members’ names, 'active" [which I use with a SmartFolder to keep things I am currently working on from all over the filesystem in an easy to access place] and so forth).

Each button executes a Keyboard Maestro macro which assigns that tag to all files currently selected in Finder. (Actually there is a KM subroutine which takes a list of tags, and either assigns them to the selected files or removes them from the selected files if the tag name starts with a minus sign, and then the specific tagging macros use the subroutine to do the actual work - but I digress.) All of the tagging macros have the same keyboard trigger in KM so that a conflict palette will pop up to allow me to select the appropriate one, but when I am at my desk, I always use the SD to trigger these macros.

I also wanted a way to remove the tags as well, which is much more common with the active tag than any other, but is still generally useful. Originally I had just created a single button that would remove the active tag, since I don’t have to remove the other tags that often and did not want to dedicate buttons to each.

Then I started playing around with using a short button press to add a tag and a long press to remove it, but that seemed more cumbersome and I’m not sure how long to hold for along press…so I thought maybe working out how to have the button flash when the long press was “long enough” and the actions were being executed, which I think I can do with a script widget, but I haven’t played with that yet…

And then a use for a conditional activation group became clear. I created a single button that has no actions attached to it in the Finder specific configuration, next to my tagging buttons.

The conditional action group is set to activate when he current app is Finder and that button is being held down. Then, in that group I set up the same set of 9 SD buttons, in the same locations as the tagging buttons, but in this case the color scheme on the buttons is different and the attached scripts remove the tags instead.

Now when I press and hold that button when Finder is active, the tagging buttons change and while holding the button I can press any of the tagging buttons and remove the tags.

Very convenient and very cool!

2 Likes