I don’t think there’s any way to do this with the Stream Deck software (SDS) as it doesn’t have any scripting and I think you need some data storage, and maybe some conditional logic handling depending upon how they implemented it … which they haven’t so that’s a moot point.
Better Touch Tool (BTT) on the other hand does allow for more flexibility. I think I can see a way to do it, but I am not going to say I would recommend doing this as it is a little convoluted.
Profiles => Groups/Folders
In BTT, profiles work on conditions and automatically switching you in and out of them - like when you switch apps. I don’t think that you want that. I think instead you would want to use groups. They are the same sort of idea as folders in SDS, but only sort of, and confusingly, whereas they seem to be referred to as groups in many places, there’s also practically an equal number where they seem to be called “folders”.
Forward
With the groups in place and populated, you can add additional Stream Deck button entries to trigger your navigation, switching to another group by name (Open Stream Deck Group With Name
). However, you also need to build a history, so you can set a variable in BTT to be the name of your current group - i.e. you are saving the name of the group you want to return to.
e.g.
Backward
Variables are accessible to scripting like AppleScript, but not so much to the internal actions of BTT by the looks of it, so your return button would need to trigger a script that in turn access the BTT variable and makes a decision based on that.
I don’t see any AppleScript way to open a group by name, but we already know there is a way to open a group by name using an action. You can create Named Triggers which can be triggered from an AppleScript script, so if you created one of these ofor each group you need to return to, you can have your ‘return to previous group’ trigger the appropriate named trigger.
After doing this, we need to update the historic variable so we nown where to return to from there. Except, we haven’t stored that. So prior to triggering the script, we should set another variable (say currentFolder
) to the name of the current group, then the script can copy the content from that into the new one - or better yet it could exchange the values between the variables.
You might be getting the idea of why I wouldn’t necessarily recommend this approach. Typically a developer might code this sort of thing into the background of the system in a simpler way to avoid you rolling your own multi-level convoluted solution. But I don’t think that’s around right now, and this was the nearest I could get while idling over a cup of tea and thinking about the issue.
Mull it over, and good luck if you do want to try that approach. With any luck, someone else will have an idea that is less concoluted than this one.