Change the Hot Key for Multiple Macros at Once

I use the conflict palette a lot, and sometimes want to set the trigger hot key for a number of macros at once. Say below:


I would like to add a ^⌘F hot key to all the clipboard filters (without having to individually add them).

Any way to do that?


You can add a hot key to show a palette for the macro group.

Yes, I have seen that but that is not a conflict palette, and if I have 2 groups with the same trigger then there is an extra level of conflict to go through to select different groups.

Ok, I think a have a solution. You can show a palette for multiple groups (or even individually selected macros from different groups) using the same hot key the way shown below.


1 Like

Awesome, thanks for that!

While it seems @anon71407114 has already helped you find a solution that works, I would be remiss if I didn't point you to this group of macros that makes working with triggers easier: KM8: Copy, Paste, and Batch-Delete Triggers

The AppleScript will add the first trigger of a specified macro to all the macros in the specified macro group (you'll get a bogus extra one in the original macro if it is in the group as well, just delete that manually).

tell application "Keyboard Maestro"
	set s to macro "Macro 1" of macro group "Test Macro Group"
	set t to trigger 1 of s
	repeat with m in macros of macro group "Test Macro Group"
		copy t to end of triggers of m
	end repeat
end tell
1 Like

It should be easy enough to check for the macro UUID in the loop and exclude it from the copy if it is the original macro.

Yes, it should - but using "if s is not m then" did not work, and so I stopped trying to do anything further with it, as it was likely a one-off answer anyway, and deleting the extra trigger is quicker than figuring out the code to exclude the matching macro.


Hey Guys,

This AppleScript will take trigger 1 of the selected macro and add it to the rest of the macros in the Macro Group – and it will not create an extra trigger.


# Auth: Christopher Stone
# dCre: 2019/08/29 16:56
# dMod: 2019/08/29 17:01
# Appl: Keyboard Maestro
# Task: Add Trigger of Selected Macro to All Macros in that Macro Group
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @Keyboard_Maestro, @Add, @Trigger, @Selected, @Macro

tell application "Keyboard Maestro"
   set selectedMacro to item 1 of (get selected macros)
   set theMacroGroup to macro group of selectedMacro
   set theTrigger to trigger 1 of selectedMacro
   set macroList to macros of theMacroGroup whose id is not (id of selectedMacro)
   repeat with theMacro in macroList
      copy theTrigger to end of triggers of theMacro
   end repeat
end tell

1 Like