Keyboard Maestro and Parallels

Since installing Parallels I am having trouble with most of my application switching macros. I almost exclusively use a control/letter (control / D) for example. Quite often I have to do the key combination three times before it will activate the desired application. What is odd is that control / w to activate Windows works every time. Does anyone have any ideas or suggestions on how to track this down or remedy this issue as it is really adding up to wasted time….Thanks for any Help!

Is that the case even when Parallels is not running?

What happens if you use a key combination that does not include the control key?

If that happens while using Parallels then it is likely that Parallels is “swallowing” those keypresses, i.e. they will be usable within Parallels only.

Do you mean that it activates Parallels?

I had similar issues and the problem is that Parallels / Windows (some combination) thereof is eating the keystrokes. The solution that worked for me was to change the triggers to when the modifier key is released (instead of pressed) and that solved my problem.

I have no triggers that are based solely on the ⌃ key so you will need to test that but hopefully it works,

Let us know.

PS. I am not in front of my computer at the moment else I would test this for you.

Yes

The same thing most of the time. Very infrequently the key stroke works. Tested with the Control key and Option keys.

Even from within parallels the key stroke fails.

Windows 11 VM within Parallels.

I tried this per your suggestion and had the same failure. Key stroke activated on the third try.

In that case, the problem may be due to background processes that continue running (you can use your Mac’s Activity Monitor application to search for processes that match “Parallels”).

These articles on the Parallels Web site might perhaps contain relevant information:

Otherwise, I hope @Joel or other forum members who are regular users of Parallels (I think there are a few) will be able to suggest something.

Closing Parallels and Windows VM and searching Activity Monitor for Parallels does not yield any results. KBM still exhibits same problem as mentioned previously. Thanks for the suggestion though!

1 Like

Back at my desk and happy to help.

Can we go back, does the problem happen should you not be running Parallels. We should start with that first confirm Parallels is the problem a the compare Parallels setups.

One critical setting I have is that macOs keystrokes remain macOS keystrokes even in Parallels so I can trigger things.

Woudl be helpful to know what mode yo are running Parallels in too.

Are you using Parallels in "normal" or Coherence mode? Are your hot key triggers working properly when a Mac app is frontmost but failing when Parallels (or any Windows app, if using Coherence mode) is active?

If you've an example of a macro that fails -- something simple that we can all test, like switching to Safari -- that'll help. You can find out how to upload macros on this Wiki page.

Yes, even when Parallels and the VM are closed.

What setting are you referring to?

Issue appears to happen in both coherence and not coherence.

I don’t mean to pre-empt @Glacier’s reply to your full question, but in regard to that part of it, it appears from a previous reply that even when Parallels is closed, the triggers are unreliable:

That’s curious and worth emphasising I think. :thinking:

@Glacier, once you’ve answered @Nige_S’s questions, here are a few more for you! :slightly_smiling_face:

  • Is your Mac running any other automation applications that use hotkeys?
  • Just to check: what happens if you replace one of your usual kind of hotkeys (e.g. ⌃-D) with something unusual such as ⇧⌃⌥⌘-Fn10?
  • If you set up a new account on your Mac and switch to that for testing, are the problems the same?
  • Have you tried interactive help?
  • Would it be a hassle for you to uninstall Parallels (completely) and see if your macros now trigger reliably?

Of course you could also try reintalling Keyboard Maestro. This is only rarely needed, and is only mentioned in the Wiki in connection with MacOS permission issues (which I don’t think will be the issue here, because in such cases the keystrokes would work or fail reliably—I think!).

Tried it both ways and hot key triggers fail until third activation in both Parallels and Mac app.

Macro below that that fails. I should mention that I use Spaces (multiple desktops).

DEVONthink-- Activate-Hide-Center Mouse.kmmacros (31.2 KB)

Just to rule out one aspect…

A lot of control-[key] combinations are already in use by MacOS for text editing purposes, e.g. ⌃-D is used for delete forward. However, these can be overriden (e.g. in KM or in System Settings) without causing issues.

1 Like

What happens if you remove ⌃-D as the trigger for that macro and use it as a trigger for a macro with just one simple action, e.g. use Select or show a menu item to display “About Devonthink…”?

If that does not work reliably, what happens if you try the same thing for, say, TextEdit?

My thinking is that the contents of the macro shouldn’t matter if the problem is with triggering, but let’s be very very sure about where the problem lies. :slight_smile:

As a start, this tells me that the problem is not Parallels related because it happens when Parallels is not running. We need to look elsewhere.

As noted above we need to get macOS working before moving to Parallels. Have you tried using different modifier keys that will not conflict with anything such as ⌃⌥⌘?

After mentioning Spaces previously I played within the same space and the triggers seem to work. For example Space three is setup to always open Safari (Control/S), Mail (Control/M), and any application that is allowed to open in any Space. I only use triggers for my most used apps.

Spaces can get a bit funky about what is or isn't the frontmost app (edit to add: It looks like you've just discovered that on your own!), what happens when you activate an app, and so on. I don't use Spaces myself but, IIRC from other posts here, things can depend on which Space you're in and which Space(s) the app is in.

The DevonThink macro is always active, so start with that. The first thing to check is whether it's not triggering or if it is but not doing what you think it should. Open up the KM Engine log (~/Library/Logs/Keyboard Maestro/Engine.log) in Console or Terminal with an interactive tail (tail -f -5 ~/Library/Logs/Keyboard\ Maestro/Engine.log, Ctrl-C to end the process), press your ⌃D hot key, see if that triggering is added to the end of the Engine log file.

Not familiar with Console.:wink: This was the result. Three times before activation occurred.

I am definitely starting to think it is related to Spaces.

Be careful/precise with your phrasing -- activation can mean different things, but I assume that here you mean the activation of DEVONthink.

You can see from the log that the macro was triggered three times, so it isn't that Parallels (or some other process) is swallowing your hot key combo -- that part is working as intended. So yes, it looks like a Spaces thing.

Spaces are a PITA when it comes to automation -- Apple never bothered giving the Spaces system the public hooks that KM, Shortcuts, and other utilities need to get information from, or make changes to, them. You might find some help if you search for Spaces (or maybe desktops) on this Forum, but because they can be set up in so many ways you'll eventually have to start poking around yourself.

1 Like