Can the Macro only work in the specified url ? thankyou!

I want to set some shortcuts for a specific website, but I don't want to apply them to all websites.

Hi @live,

My workaround is to add a "focused window title" condition:

Use the %WindowName%1% (the targeted browser window has to be the focused window) token to find out the window title and put a unique enough string there (in my case above, SpeedGrader was sufficient).


Hope this also works for you.


As @Martin pointed out, simply add the focused window title condition to the macro group settings.

For instance, I have a macro group that is for the Keyboard Maestro forum only; you can see it's settings below ↓

So if your Notion webpage has a certain word or phrase that is always present, you could do it this way.

1 Like

Thank you @martin @cdthomer!

Notion has no fixed title, and the fixed information is on the URL.

Your method is very effective if there is a fixed title.

When you say "I want to set some shortcuts," does that mean you want the macros to be active or do you mean you want them triggered? The correct answer would depend on which of these choices you mean.

I'm going to guess that you mean "active." In that case, I don't think KM has a way to do that directly, but you can simulate it fairly easily indirectly simply by exiting the macro if the URL that you want is not listed in the URL bar. Like this:

1 Like

As @Sleepy suggests, you may use the IF/Else action. If you have more than 2 cases, Switch/Case is a better choice:


1 Like

Thank you for your help. @Sleepy @cdthomer

This macro can't stop, it keeps running.

Research for half a day has not been solved.

Tab Modifier - Chrome 网上应用店

I found another way. First, rename the webpage through chrome, and then I can set the shortcut operation.

So my problem is solved. Thanks again for your help.

1 Like