I am trying to have BTT displayed all the time without the control strip. I've a trackpad gesture setup to enable/disable BTT so that works like a charm.
Whenever I need to delete a file in Finder, I am used to pressing cmd+opt+delete which brings up a confirmation dialog and I am used to pressing the dialog button in Touch Bar. However, with BTT TB enabled, that doesn't show up and if I move my hand down to the trackpad, I might as well just click the dialog button with the trackpad itself.
Solution (not working): I created an empty CAG with conditions to detect only when finder dialog is activated. I checked using the CAG creation screen, that it is activated only when that delete confirmation is showing in Finder, ie the text turns green. So the conditions are okay. Then I created a trigger to toggle BTT TB when this CAG is activated. But it doesn't work! Surprisingly, it only works when I have the CAG editing screen open otherwise it fails.
Unfortunately the notifications sent by macOS / Finder for such dialogs are not reliable currently. While the CAG editing is open, BTT does additional polling, but due to the performance cost it's not really an option to do that all the time ;-(
Currently I don't think there is a good way to detect dialogs.
Maybe turning off the BTT Touch Bar for a few seconds after pressing cmd+opt+delete would be an option? This could be achieved with a little Apple Script.
Thanks for the quick reply! Interestingly, it started working after I restarted. But now that it's been a few minutes, it's failing again even if I wait a few seconds at the dialog. So you're correct, it's not dependable.
Regarding your solution, why would I need to use AppleScript? Can I not just remap the keys to first disable BTT TB and then send the keystrokes to Finder?
Yup, but automatically bringing back the Touch Bar after a few seconds is currently a bit hard without Apple Script (can be done but I'd not recommend to)
One thing that's important when doing such remappings: the keyboard shortcut needs to have the "Prevent recursive triggers" option enabled. Otherwise it will trigger itself and cause a endless loop
I'm staying away from the idea for now as it seems too cumbersome for something little.
Thanks for the tip about the recursive triggers. That might come in handy some day and I'd never have thought that myself!