Joseph Lee wrote:
It is possible to let add-ons detect profile switches and "disable"That would require each add-on to implement some kind of solution to this. Very fragmentary at best.
After thinking more about this, a possible solution has occurred to me.
Someone could write a "Disable Add-ons in Config Profiles" add-on (perhaps with a better name).
That add-on could listen for profile changes as Joseph described, and if the profile matches something pre-configured, have it look up all of another add-on's gestures, snapshot them, and disable them.
That could be done with manager.userGestureMap.getScriptsForAllGestures (as I do in the Numpad Nav Mode add-on).
Which I think would work fine for custom gestures, unless I'm forgetting something.
Then, on reversion to default or any other profile, reverse the process.
Provide a settings panel which lists available profiles, and gives a selection of add-ons which can be enabled or disabled in it.
(Really, just enabling/disabling their keyboard shortcuts).
I doubt I'd want to see that in core though. It seems as if it might be fragile; but as an add-on I could see it working.