Hi. I have encountered a situation in which a trigger in a disabled folder in a CAG stills interfers with the same trigger defined for all apps.
To reproduce it, define a specific trigger in all apps and in a CAG (e.g. TextExit). Put the trigger in TextEdit inside a folder and disable it. When TextEdit is active, that trigger stops the same trigger in all apps from working.
Hope I explained mysellf. This is a preset with an example. I have tried 5.294 and alpha 5.321. preset.bttpreset (5.2 KB)
This is intended (legacy) behavior. I can't change this unfortunately. (A disabled keyboard shortcut in a specific group means "use the standard system behavior - ignore what is setup in BTT")
It is best to delete the shortcut (not the macro) or, in the case of a CAG, change the condition so that it becomes untrue, always untrue. This should work, I think
Or, of course, delete everything. But sometimes you want to keep something as a template.
I did this for a while with a deactivated preset, but when I move the triggers somewhere, they are no longer where they make the most sense to me. But yes, there are different strategies.
It's unfortunate that the legacy behavior can't be corrected. The behavior is quite inconsistent—for example, if you have the same trigger in different groups within a CAG, the various activation states of the groups don't result in predictable behavior.
As for the possible solutions, I don’t quite understand the template solution.
It is predictable, but you need to remember that rule: If a CAG with a disabled keyboard shortcut is active - then the system default functionality for that disabled shortcut is used. This allows to disable globally defined keyboard shortcuts for specific apps or groups (and was the only way to achieve this before CAGs existed which is why it is used in many older setups).
Isn't that the reason why the CAG should be disabled and not the shortcut? So if a condition only applies to TextEdit, then I change it to TextEditxxxx. The change is immediately recognizable and can easily be undone.
So you mean, for example, creating a cag with a condition like: "TextEdit is active" and customVariable=true and then altering the value of customVariable to control the cag activation? Or is there another way? Thanks.
The goal is to change the conditions of a CAG so that the CAG can never become active. One possibility is to make the name of an app, say “TextEdit” the name “TextEditxxx”. As there is no app with this name, this CAG is never active. This is why the shortcuts in the CAG never interfere, even if they remain enabled.
If it is only a matter of individual shortcuts, I find it easier to delete the shortcut (click on x). This is not the same as disabling the shortcut. Disabled shortcuts cause problems.
And speaking of that, something similar occurs with Key Sequence.
Anyway, the problem is not to find a solution, the problem is to understand what the problem is
Edit: Andreas, I really don't understand any of this, so I'll just fantasize a bit . Is there no way for BTT to do something behind the scenes to hide a shortcut that is disabled. Comparable to the TextEditxxx trick. TextEdit is still there, but it is hidden.
So, turn cmd + a into a shortcut (something) that doesn't exist when the shortcut is disabled. If I were as clever as you, I would think of something
Ok, I understand. The thing is, I want to disable the cag dynamically from inside a JavaScript function, and that's why I was proposing a solution that depends on the state of a variable.