Finder blocking KM macros / KM macros not being invoked?

Brand new Keyboard Maestro (KM) user here. Apologies if this is a known, trivial issue…

I have a macro (actually authored by Peter Lewis, himself) that uses a KM variable to enable an AppleScript that creates an alias of a file on the clipboard at the current Finder insertion location. When I run the macro from within the editor it behaves exactly as intended. However, when I use the keyboard shortcut I’ve assigned (option-command-v), it does not work, and it does not appear that the macro is ever being invoked. I’m trying to figure out why and what to do about it.

I used the tutorial and that macro works as expected, so the engine is obviously running and it has accessibility enabled correctly. This macro also shows up in the KM debugger when it is enabled.

When I assign option-command-v as the shortcut, the file is moved instead of creating an alias. And the macro never shows up in the KM debugger.

When I assign shift-option-command-v as the shortcut, the file is copied instead of creating an alias. And again the macro never shows up in the debugger.

When I assign control-option-command-v as the shortcut, absolutely nothing happens. Again, nothing in the debugger.

So it seems like the Finder happens to have some built-in shortcuts (option-command-v and shift-option-command-v) but is otherwise unconditionally blocking KM macros invoked via the command key. (Remember F5, as defined in the tutorial, works correctly.) Does that sound at all sensible? Is there anything I can do about this?

Hi Larry,

It sounds like the macro is disabled, or is part of a macro group that is not set to be available in the Finder. Try double-checking that the macro is enabled (you can read more about what that means here: https://wiki.keyboardmaestro.com/Macro_Activation) and that it is part of a macro group that is available in all applications and/or Finder (more here: https://wiki.keyboardmaestro.com/manual/Macro_Groups), then try your original preferred shortcut again.

Assuming you’re using Keyboard Maestro 8, you can also try “Something expected is not happening” in the new Assistance option, which can be found in the Help menu.

If this doesn’t work, or anything is still unclear, feel free to ask any follow-up questions.

[quote="larryy, post:1, topic:8449, full:true"]
Brand new Keyboard Maestro (KM) user here.[/quote]

Hey Larry,

Welcome to the forum and the Keyboard Maestro community.  :smile:

Even something trivial can become quite the sticky wicket...

For future reference — when making a help request — please post the macro you're working with and a picture of same whenever possible.

(The Keyboard Maestro Editor's share menu makes this easy. Read the wiki though, because there are a couple of finicky details.)

If you're using Peter's exact macro then posting a link to the post you got it from is fine.

Keep in mind that a bunch of prose is usually quite hard to test — and the easier you make it to test out your problem the more likely you will in fact get help.

Finder keyboard shortcuts:

Copy and Paste files					-->	Cmd-C, then Cmd-V

Copy and Paste files Exactly			-->	Cmd-C, then Cmd-Option-Shift-V
(Keeps original ownership & permissions.
Requires Admin username & password.)

Cut and Paste files (Move files)		-->	Cmd-C, then Cmd-Option–V

Keyboard Maestro will override those keystrokes. Try creating a macro that does nothing but “System Beep” for testing.

This means you're activating the Finder's keyboard shortcut — NOT the Keyboard Maestro shortcut — and that suggests that you have some sort of macro-scope or macro/group enabled/disabled issue.

Not so.

It seems likely that there's a nice little gotcha in your macro.

If you'll post it — we'll figure it out.

-Chris

1 Like

Got it! As suggested, the Macro Group was disabled. The Help > Assistance window was extremely helpful. And may I just say, KM rocks!

You can ignore the rest of this, unless you want to see the macro out of curiosity or read a couple of thoughts about why this was a stumbling block for a novice and what might be done about it.

There were two confusing bits, and here are a couple of suggestions that might help:

  1. The group in which I'd just created and enabled a macro was disabled by default and the enable/disable control at the bottom of the Groups column always shows a check, never an X.
    Especially since the equivalent control toggles between check and X in the macro editing screen, it would be logical and much more clear for novices if this control did the same. (When you click on a particular group it would change to the state of that group.) Now that I know what I'm looking at, I can see that the group is slightly desaturated when disabled, but that was not at all obvious on initial inspection. Also, I think if the user has gone to the trouble to edit and enable a macro in a group, the group should be enabled by default. It's nice that it can be disabled, but being disabled by default, after having just created and enabled a macro in it, doesn't make sense to me, and was the ultimate source of all my confusion.

  2. In the Assistance window, the "The Macro Group is [In]active" line was showing my macro was inactive, and at first I could find no way to make it active. I finally realized that since it was only supposed to be active in the Finder I needed to make it possible to see the Assistance window when I brought the Finder to the foreground. Here again, now that I know what is going on, it all makes perfect sense, but a novice could use some additional assistance here. A succinct statement in the Assistance window about the condition that is blocking enablement would probably have done the trick. Something like "Finder must be the frontmost application." This would be based on the availability and activation settings for the relevant macro group.

And, FTR, here is the macro:

Keyboard Maestro 8.0.3 “Make Alias to Clipboard File” Macro

Make Alias to Clipboard File.kmmacros (2.6 KB)

1 Like

Good, I'm glad the Assistance window helped. It seems to have worked out well at solving these sorts of issues quickly - it's just unfortunate that there is almost impossible to get people to know about it before they have a problem it can solve.

There is always a UI issue with buttons/menus that toggle anything. It is never entirely clear whether the button is indicating the current state, or what it will do.

If it is an , does that mean it will disable it, or does it mean it is disabled, and clicking it will change it.

As you note, disabled items are dimmed, and again, there is a tradeoff between dimming it enough so that it is clearly disabled, and dimming it too much so that it is hard to read. A tradeoff that varies with the display and its brightness and contrast settings.

Groups and macros are created enabled by default, so I don't know why you think it was "disabled by default". Imported macros are disabled by default for safety, but macros or macro groups are created enabled.

It is not disabled by default.

One common mistake made by new users is to think the "tick" means something like "save" and tick it, thus disabling the macro/group.

All this just proves that UI is hard, and that while I can improve things, at the end of the day, knowing how it works is the only solution, and it's hard to get there except the slow and painful way.

My favourite example is the common door with a knob on it. Most people will know they have to turn the knob and then push or pull the door, but in the absence of that knowledge, the only way to figure it out is by poking around at it until the door comes open. Even then, there are knobs that don't need turning, and knobs that turn only clockwise or only counter clockwise. Such a simple thing, and yet still there is no shortcut except by learning it.

This is a good idea, although far harder than it seems, since the ways a macro group can be inactive are almost infinite. Especially if you then include the fact that you can use an action to actively deactivate and otherwise active macro group, so the macro group settings alone are insufficient.

They are all good ideas and I will note them down. Just trying to explain why some of the things are the way they are, and many of them have gone through transitions in the past and will not doubt again in the future.

1 Like

Yeah, I was thinking about that. One odd thought: I found the debugger quickly. (Granted, being a programmer probably influenced that.) Perhaps the debug window could have a "Try Assistance?" button. I'd probably have found and tried it if it had come to my attention that way. I know that cluttering up a nice clean interface is bad in itself, so just take this as a random thought, for your consideration.

Absolutely. That's always a problem. The best you can do is be consistent and add tooltips / hover-text. If I remember right, in the edit-macro pane the means it's disabled and the check means it's enabled, and if you hover over the box it explains that. I found that clear and informative, which is why I suggested making the Macro Group control behave similarly, though I forgot to mention adding the tooltip.

While it's conceivable I clicked the checkmark button under the Macro Group column and turned it off, I really don't think I did.

But I did import this macro, so that's probably why it was disabled. I can't remember exactly how I imported it. I think I just double-clicked the macro file, after confirming that its filetype would go to KM. So it's having the macro group be disabled by default in that scenario that I was suggesting might better be enabled by default. I realize that KM is quite powerful and importing a malicious macro could be disastrous, but since importing the macro requires action by the user, I would probably lean towards enabling it by default. Or perhaps bringing up a dialog asking the user if they want to enable the Macro Group when it is imported. At least that would alert the user that that is an issue. As things are now, I had no clue that something other than the macro itself needed to be enabled to make it work. That was the gotcha for me.

Another alternative would be to disable the imported macro, so it shows , and disable the control, so it can't be enabled by clicking it, but either via hover-text or by bringing up a dialog when the user clicks on the you could alert the user to the fact that the macro cannot be enabled until the macro group is enabled. That would probably also have worked for me.

Regardless, I'm just spitballing ideas, not trying to convince anyone of anything. KM is a beautiful piece of software. Based on the design I have zero doubt the source code is a thing of beauty as well. I just thought I'd share the perspective of a total newbie to the tool, which you and many on the forum will be well beyond.

Yeah, even without deactivation actions I realized the set of possible activation blockers could be enormous. I can only hope they boil down to a modest number of categories of blockers, so filling in a few slots in one of a modest number of templates would catch a lot of failures. But I'm sure this is far from trivial.

Thanks for the great software and the enlightening discussion.

1 Like