Ungroup actions?

We have the Engroup>Group option
Is there a way to Ungroup a set of grouped actions without dragging them outside the group?

Nope. Would be handy though!

You learn something new every day!!!

1 Like

Yes. Select Grouped Items and Menu Item, Actions>Degroup (or select the Actions and use Right-Click to get same thing in context menu).


Thanks. One think that's weird and I would maybe suggest (will create a new thread for this) is that we could select the group itself to ungroup, instead of the actions inside the group. I was going crazy now because on a new macro test I could see the Degroup option, but for another macro, it was grayed out. It took me a while to understand that selecting the group makes it grayed out, while selecting the actions, makes it available.

Thanks for the tip!

@peternlewis I posted this 2 years ago, but it seems that this is not yet implemented.
Would this be something you would consider? Adding the Degroup option when the group itself is selected? I was having the same issue again today and couldn't figure it out ... again.
I understand the concept of selecting the items to degroup, but at the same time, it seems to me that it's a more familiar concept that we select the group and then degroup.
And it removes unnecessary steps. If the group is collapsed, you have to click to expand it, click the first action, scroll all the way down, click the last action, degroup.

Pretty much the same way that you select a ZIP file to unzip it, you don't go inside and select the files and choose to unzip them, for example.
There are obviously more examples out there, but I'm sure you get my point.

Have a go with this. It will only work with actual groups (as opposed to switches etc). Triggering it with a group selected will ungroup it; triggering while actions are selected will group them.

It's not thoroughly tested, and there may be a better method than this, but it's a start.

Group-Ungroup Toggle.kmmacros (58 KB)

Macro screenshot

1 Like

With the action selected:

  • Command-Control-Right Arrow (Action ➤ Enter Action)
  • Command-A (Edit ➤ Select All)
  • Action ➤ Degroup

I knew it...

Group-Ungroup Toggle.kmmacros (56 KB)

Macro screenshot

1 Like

If the group is collapsed, you need to add another step: Actions > Expand Action
I tried to create a macro that goes through all the steps, but it's not working.

But to be honest, as a productivity app, I would expect KM to have this included without extra clicks/menu options/macros. This would make the workflow faster and easier. I hope you consider adding this in the future, because it's something that I believe most people find useful and more intuitive when selecting the group, instead of selecting the actions inside the group.
As I stated, I understand that we are removing the actions from the group, but still, it's a workflow that most people are not familiar with. We unzip the zip file, we don't select the files inside the zip and unzip them. In Logic Pro we group tracks into Stacks and then we Flatten (aka Degroup/Ungroup) those stacks by selecting them, we don't select the tracks inside.

I tried it and the first time I ran it, it worked, but then it would work sometimes, sometimes it just hangs/pauses.

I think your approach using XML is a good starting point, but I think (looking at your macro) that maybe there's another way to achieve this.

I copied the XML from different states:

  • Group, collapsed
  • Group, expanded
  • Individual action selected
  • 2 or more actions selected

And they all seem to have that </array> that you at one point check if the variable Local__XML contains or not, but again, all of those 4 options contain that piece of text, so maybe that's not what we should be checking?

But there's


that only groups have, of course, and then


also in groups only. So I guess that's what we probably need to be focused on, right?

I also like having 2 different shortcuts for Group and Degroup, because I try to be consistent across applications and since I have 2 shortcuts for Logic (Create Stack and Flatten Stack), I also have 2 for KM's Group / Degroup.

I will check your macro when I have some time and will see if I can find a way to achieve this.
I just knew about the XML options yesterday and I se how that can be super useful for some future macros I have in mind :slight_smile:

You're not seeing the entire text block; there's more than just </array> in there.

Oh ok. I wasn't sure what you meant by "You're not seeing the entire text block".

@peternlewis maybe this would be a scenario where the field would be converted to a multiline field (if possible) or at least show some kind of icon next to the field to indicate that the condition contains more than 1 line to avoid confusion, not only for other users that download macros shared in the forum, but even for the user him/herself in the future looking at their own macros.

@noisneil I will check the macro again and see what's not working for me. Are you able to make it work 100% of the time?

At the same time, I'm wondering if that is all necessary when a more simple macro would work as well such as this one I created (but it's not working either):

Degroup.kmmacros (25 KB)

Here's what's actually in that field, despite only </array> being visible:


So far, yes.

Yes, I had the same thought!

Group-Ungroup Toggle.kmmacros (56 KB)

Macro screenshot

1 Like

yes, that's why I think the field should become a textarea field, or if that's not possible, at least show an icon indicating that there's more text than what's visible.


Hello Tiago (@alltiagocom) and Neil (@noisneil)

Following this thread I wanted to share a little tip … just put any Xml Snippet or other text which has multiple lines into a Variable and use the corresponding Token in that Condition Field as this Field allows Tokens.

This reduces confusion with Multiline entries. I am doing it in my macros for years now.

Actually I often have such things as little Textfiles in the Sync folders of my MacroLibrary in the Dropbox when Formatting is also needed and edit these files with BBEdit.

Greetings from Germany


1 Like

I brought this up in a feature request a while back:

Peter says it's not possible to have them all expand, but did offer this glimmer of hope:


Sorry, which field?

Perhaps prudent, in such cases, to provide the name of a variable bound to several lines ?

( Rather than depending on our fragile recall or hazy knowledge of lines – possibly – hidden beyond the lower bound of the displayed field)

1 Like

Hello Robin (@ComplexPoint)

I’ve already made this suggestion:

Greetings from Germany


1 Like