Deactivate Macro group Not working

Hello,
The Deactivate Mac group function seems not working. I also tried Activate/Deactivate, it does not work either.
I’m using the latest version of KM, 8.1.1, on MacOS 10.13.3
Any help appreciated.
Thanks,
Martin

Sorry. I think it was activated and deactivated.
I did not see any difference in appearance. But in effect, the activation and deactivation functions do work.

Ok. I think it is working. But the “Display toggle” function does not work properly.
Most of the time it won’t display.
This might be a bug?

Better late than never!

I am just learning about this action now- and as far as I can tell when you are just using "Activate/Deactivate macro group" what is actually happening is that the triggers for the macros in that group are being turned on and off. So if your not using palettes there is no visible sign of whether or not a macro group has been de/activated. Which is a little bit confusing I think, but it works anyhow.

In regards the "display toggle" function, I think that only comes up if there has been a state change from active to deactive or vice versa.

Actually, that is incorrect. Macro triggers are not changed in any way.

Macro Group, and Macro, activation can be a confusing topic.
See Macro Activation .

Deactivate/Activate Macro Group is not working for me. The Toggle Display is shown but the group is not activated/deactivated.

Please post a screen shot of the Macro Group and upload the Macro where you are changing the active state of it.

Please read:
Tip: How Do I Get The Best Answer in the Shortest Time?

Macro that should activate/deactivate the macro group:

Deactivate Macro Group.kmmacros (1.3 KB)

Screenshot of Macro group:

I figured out activating or deactivating is working, but it is not shown as activated/deactivated. There is still a checkmark an not an X behind the Macro Group name. Is this a normal behaviour? It's a little bit confusing.

Try the Set Macro or Group Enable action instead. I'm guessing that's what you really want.

Yes.

The large image or image indicate the "Enabled" status of the Macro, which is quite different from the "Activation" status. See Macro Group Activation .

@peternlewis has stated it is better to toggle the Activation Status, rather then the Enabled Status, because:

  1. It is faster
  2. Changing the Enabled Status causes the large Macro Group/ Macro plist file to be rewritten, and also will rewrite the KM Sync file, affecting other Macs, if you have Sync enabled.

Rather than toggle the Activation Status, you may want to explicitly Activate and Deactivate it as needed:

image

This way you will be assured of its status when the Macro Action is run.

Ok, thank you!

<above the line is the too long intro, bellow the line is the comment>

A few years later....

So I've bought KM like years ago. I marveled at possibilities KM can bring but the particularity of how KM is designed etc made me hate my life. I gave up on it dosens of times.
Caveat: I have some complex ideas how stuff should work. Also I am a dev that worked as a product designer (not a UI painer) for over a dacade which made me very frustrated with unnecessary complexity of it.
Then last year with too much free time on my hand and Perplexity Pro account I set again to automate my workflows in KM. I figured out how to do a bit more complex stuff that I wanted to - AND I LOVE IT.
Sorry for a too long intro...


After good hour of searching in disbelief I can confidently say that Deactivated state is nowhere in the documentation explicitelly stated. Enabled/disabled and activated and deactivated are not explained in clear way. Deactivated state is explained only to be achieved by first activating a group. I knew this made no sense so actually (for people searching for solution and in hope @peternlewis to update docs):

the solution is to set macro group to Activate/diactivate or Activate for one action and not set the trigger.

@peternlewis it would be greate if you can add Deactivated in the menu. (And a note that Always activated is implied in Activated so for simplicity it would help the UX)
And thank you for this amazing app. I spent too many hours setting up layers upon layers of automation for almost anything. In short I'll summarize it with this: I talk to my watch and everything (and I mean everything) happens on its own. I almost don't need to open my mac lately except to do actual work or if I'm in need of bigger screen. :bowing_man:

Did you ever read the Quick Start? The Quick start covers that Macro Groups “controls when the macros it contains are active”. The manual Macro Groups section also explains that Macro Groups control when a macro is active.

I'm not sure what that means.

A macro is either active or not. It is active if and only if it is enabled, and its parent macro group is enabled and its parent macro group is active.

Which menu do you mean?

Great, I'm glad you are getting good use out of Keyboard Maestro.

1 Like

Sorry for the late reply....

The way you answered made it clear to me - but it is still confusing.

If I understood now correctly, the wording on for group conditions is not for the group but for the macros in the group, right?
It's not Macro group is always activated but Macros in the group are always activated?
The only noun in the menu is group therefor I thought all options refer to the group but it is not so.

Ok, so the problem I have is that I want that the Macro default to be "Always deactivated." Why? Because conditions for macros are not the same as conditions for groups. I'm sure you have a reason for it.

Anyway, I have to activate group with the macro. But how to set it up so all macros are deactivated?

So I guess the solution would be to select all macros in the group and deactivate them but set group as always activated?

See how that doesn't really make sense?

Let's say there's a group of macros and some are active and others are inactive.
If the group setting is always activated, as higher category setting, it should overrule individual setting per macro. If it cannot overrule them, then it should be greyed out as not applicable option.

Confusing.

So either group can be active and inactive or the conditions should apply differently and the wording on the menu should change to be more clear.

And about the workaround...
What I did is to set condition without trigger so macros could not fire before they are called through the macro that activates the group. (which should btw trigger error or revert to previous settings. technically the setting is stuck in 2-step edit mode between setting the hotkey and actually entering it.)

(Sorry I've typed this between meetings. if I wasn't clear please tell me. - and again thanks for all the work you've done on KM. It's amazing.)

They are equivalent - the macro group activation state controls the macro activation state.

How not so? A macro is active if and only if it is enabled and its parent macro group is active. And the configuration controls the activation state of the macro group (which in turn controls the activation state of enabled macros that it contains).

I don't know what that means.

Your image shows part of the activation condition for the macro group, together with triggers.

Triggers have nothing to do with activation, except that they are enabled when a macro is active.

I don't understand what you mean.

That statement does not make sense. You cannot deactivate a macro. You cannot activate a macro.

It definitely does not make sense. I have no idea what you mean.

That is impossible. Well, you can have macros that are disabled, and macros that are enabled, all in a macro group that is disabled, or enabled and active, or enabled and inactive.

Sorry, I don't understand that.

Read the Quick Start and the Macro Groups chapter, and ensure you understand the difference between:

  • Enabled and Disabled
  • Activated and Deactivated (which applies only the macros via their macro groups).
  • Triggers.

Don’t use the term condition unless you are referring to Conditions.

It's confusing because there are multiple similar-but different concepts in play that are being offered as concisely as possible.

In order of increasing granularity:

  1. A Macro Group can be enabled or disabled -- if disabled it won't be available, so stop here!
  2. A Macro Group can be available or not, depending on context -- frontmost app, frontmost window title, etc. If it isn't available it won't be active, so stop here.
  3. A Macro Group can be active or inactive, depending on user action -- hot key press, menu selection, etc -- and there are various options for how long the Group should remain active. If it is inactive, stop here.

The above apply to every macro in the Macro Group. It isn't technically correct, but if you prefer to think of things "bottom up" then macros "inherit" whether they can execute from their Macro Group settings.

  1. An individual macro can be enabled or disabled (the "Triggered by..." checkbox) -- enabled will allow it to execute if we've got this far after evaluating the above Macro Group settings.

All of this allows for an huge amount of control over the context in which a macro will execute, letting you do things like having a single hot key trigger that executes different macros, doing different things, depending on the frontmost app, window name, and even a previous hot key press.

I'm not claiming the above is 100% correct, but thinking of it in this way has helped me make sense of what is going on -- hopefully it'll help you too.

Why do you want to do this? What's your use case for "by default, none of my macros work" rather than, say, "all the macros in this Group work, but only when the Finder is frontmost"? If you can explain that then maybe someone will come up with a solution.

1 Like

Ok, yeah I get that I started from the standpoint "hey these things don't make sense to me" instead of "hey guys, how would you solve this". So let me first explain what I'm trying to do:

I'm trying to emulate how VIM is working: you tap leader key and then a sequence of keys that trigger things.

Example

1st approach was trigger macro group with double tap on shift key.
No can do. Macro groups have diff triggers than macros.
2nd approach: macro that is triggered by double tapped shift
Doesn't work. Because then single tap shift doesn't work.
3rd approach typed trigger - works!

2nd part of the problem: when leader key is triggered enable macro group for 1 action. When any macro ends disable group.
Doesn't work. Enabling group has lag which defeats the purpose of shortcut. Ok let's try...

2nd approach was to have the whole group deactivated from the start and then Activate for one action
Doesn't work for 2 reasons:

\1. group cannot be deactivated as initial state but it can be deactivated as a result of Macro. This was too complicated to do with timeout conditions etc so I set impossible hotkey as a trigger so I can activate it only through leader-key-macro.

  • So this is the point where you can test this by yourself if you still don't believe me. It can be that the group and all macros in it are active but they are actually deactivated.

\2. *Activate for single action is no good because there are multiple conditional triggers so it has to be deactivate after the macro is executed in full.

  1. example: leader + w for window-management + 6 for 1/6 of screen + 3 which places it to the top-right)
  2. example: leader + i for insert + s+p my proton email
  3. example: leader + p ai-prompts menu + g for chatGPT specific prompts.

This is as far as I got. Any help is welcome.

You can see that if group and macro had same triggers there wouldn't be this problem (in part.)


Also, isn't it Activate for one instance of a Macro, and not Activate for one action?
It's not like macro will be stopped on the first action. :thinking:

Absolutely, your answer made it completely clear.

How it was written I thought macro group is one logical entity and macros are separate and group influences macros but they are not the same.
How you explained now makes sense: they are the same. Group just extends activation criteria to the conditions macros in the group have.
Why it was confusing to me is that, if group and macros are the same, why would conditions be different? I would expect that the whole logic would be the same for macro and the group. Then it would be clear that macro group is factoring all conditions (activation criteria) macros in it to make it simpler.

Yes, I realize now that is not possible.

The point I was trying to make is that group condition Deactivated is missing (1st img). And yes, it makes no sense to have it. I absolutely agree. But, because I have to activate it with a macro, because the triggers are not the same for group and macro (2st img) I need it to start in deactivated state so it can be triggered by the macro.

but cannot start deactivated (1st img). Point is that condition cannot be But the group can be deactivated by default if I do it through a macro, but not through conditions.

Yes, sorry, I meant group activation criteria.

Sorry, I'm there are a lot of KM specific lingo. I haven't mastered it all yet. Pretty new to it. But I wouldn't even try posting before reading all on the subject. :slight_smile:

Activated/Deactivated when: starts deactivated, as does Activated for one action.