Tip: Click a Palette Button with Modifier Key Pressed

When you run a macro by clicking on the paette entry, you can test to see if the Command key is pressed, like this:

Check the result variable for "true" or "false".

I use this in one macro to prompt for a value. Without it pressed, I use the last value entered.

Here's the Control key:

NOTE: You can't use the Option key, because it has a special (and awesome) use in KM: It causes the macro to be opened for editing in the Keyboard Maestro Editor.

1 Like

You can test the TriggerValue token to determine the modifiers pressed when you trigger a macro via a palette or the status menu.

Well, that's pretty cool. What do I test it for? The values in it don't look like anything I can decipher.

Thanks!

It contains some combination of the ⌃⌥⇧⌘ characters.

Here's what I get:


So.... for the CONTROL character:

IF %TriggerValue% = "^" THEN do something
1 Like

Dan,

Also you can perhaps used a condition:

--Alain

1 Like