%TriggerValue% is Not Included in the "Insert Token" List

I've been doing some testing of how to pass parameters from Swift to AppleScript to Keyboard Maestro.

Starting at the KBM end, I created a macro called "Hello World". When I select that it is to be triggered by an AppleScript, KBM provides some variations on the the syntax to use AppleScript. Here's mine:

do script "Hello World" with parameter "Whatever"

I want to print "Hello, World!" and follow it with a note about whatever "Whatever" is. In my test, I'm using the literal string, "Whatever".

I remembered from recent reading about parameters that what I wanted was TriggerValue, but I couldn't at that moment remember the Token Syntax, single percent signs, double percent signs, or what. No worries, I'll just find it in the Token Menu.

But it wasn't there! In the Display Text action, the Insert Token dropdown menu does not include that token in its list. The list jumps from Time... to Tripped... without listing TriggerValue.

These dropdowns and other user hints are an invaluable part of Keyboard Maestro. They really help me to keep moving on writing what I want to do rather than having to constantly refer to the doc to be reminded of both names and syntax.

If TriggerValue was in that list, I could just click it and it would be inserted in the proper syntax and I could move on with my testing.

I didn't even notice that there is something called "Tripped Trigger Value". It didn't start with T-r-i-g-g so it wasn't of interest.

It wasn't until I started writing this "bug report", in the process of creating the screen capture, that I saw "Tripped Trigger Value". I'd never heard of any tokens starting with "Tripped", so I tried it. Well what do you know? That seemed the long way 'round the barn to find out that what I wanted ws already there.

It's useful to have items in the list by meaning. It's also useful to have items in the list by exact name.


If the description of a token is different from the name of the token, can we have both, please?

Tripped Trigger Value is the %TriggerValue%.

You can actually hold the Shift key down in that menu to show the token that will be inserted.

You can also hold the Option key down to get help on the token.

1 Like

The depth of detail that is in KBM continues to amaze me.

Unfortunately, much of it is undocumented or hidden, especially if you don't read the manual cover to cover. (BTW, is this documented anywhere? I haven't found it, and I really wish I had.)

Could there maybe be a modifier key hint at the top of the dropdown list, right above "All", that mentions that the modifier keys do things to the list, or maybe a link to the help page that explains that wonderful UI enhancement?

Keyboard Maestro Wiki > Menus > Insert Token

1 Like

It is documented in the Menus user manual section, under Edit ➤ Insert Token.

1 Like

As I finally discovered, above.

I was obliquely trying to make the point that it's one of those things that you likely won't even find in the doc until after you already know that it exists. There's a lot of stuff like that, throughout the industry and probably in other industries and contexts too.

In this case, it's a hugely useful feature, documented by one line in a page you hardly need to look at because the rest of the UI is so intuitive.

"Just In Time" documentation is difficult to achieve.

Yes, I get that. It is the reasoning as to why most applications have abysmal documentation - because frankly few people ever read the documentation at all. I try to do it regardless, and with tight integration try to make it more accessible.

But it's not really practical to add comments in to menus to describe how they work and what extra features might be available.

I've often said that the different between a power Mac user and a novice Mac use is simply that the when they get stuck wanting to do something, a power user goes looking through the menus for what might be available.

There are endless features in Keyboard Maestro that are under utilised because they aren't know to the people they would benefit, but the flip side is if I tried to make in your face documentation for each of those features you'd never be able to see anything else.

So basically, what is required is the synergy between the Keyboard Maestro UI, the wiki and the forum.

BTW, you can also search for “TriggerValue” in the Keyboard Maestro Help menu which would point you at the menu items, and the wiki.


Perhaps a new category in the Forum along the line of 'I just discovered this tip/shortcut in KM'.


The Tips category would seem to already be suitable for that…

Perhaps @Steve_E find the title "Tips and Tutorials" as implying polished tutorials and thus not really the place for simple, enthusiastic discoveries. I'm guessing. Maybe "Hey, there's a TIPS category!" should be in the Tips category (but would it be findable?).

1 Like

Yes, probably just "You can use the Shift key in the Insert Token menu" would be a bit of a trivial tip, but it would still be fine. Even better though, expand it to "How to insert tokens" and describe the various ways, including mentioning that.

But either way would be fine - if it is something new you've found that is useful, then posting it in the tips category will likely be useful to others.

1 Like