Unable to use the same hot key on two different computers

I installed and setup KM on my main computer and had hotkeys to paste some email addresses. I later installed it on another machine and tried the sync option, putting the sync file on iCloud.

When I typed the hotkey I got garbled text with bits matching the correct text:
e.g: . ©pog©¥@gmå^¬≥çøµ

I tried unsyncing, then deleting the macros, and then creating them again from scratch. I was unable to assign the same hot keys. I could get a macro that worked, but only with a new hotkey. Also the old hotkey still produced garbled text.

I tried deleting the app and all the support files, then reinstalling, but everything was just as before. The hotkeys from the other installation were still operative and could not be removed or overwritten. I also noticed that when I started up the new downloaded app, it already recognized my registration.

The list of all macros does not show those hotkeys.

I would like to use the same hotkeys on both machines.

Any clues?

What exactly is the hot key combination that you are having this trouble with?

ctl opt cmd G, plus several others with the same three keys plus a letter

As I said they all work fine on the original installation. Only a problem on the second machine.

Also the do show on the list of macros on the original machine.

I just figured it out, sorta..

I am on a mac and was using screen sharing to access the other computer. The key combo was apparently being captured and also being sent on the the other machine resulting in strange behaviors.

What's odd is there is another macro that uses the same key combo that works across both machines while sharing. The only difference is that it just pastes a single word, not an email address. That fact that one worked ok, and others did not had me going in circles.

Does someone know what rules to follow to be able to use macros when screen sharing?

New info.

  1. The inability to reuse hot keys on the second machine goes away if you create the macro on that machine, not via screen sharing. However, executing macros with the same hot key via screen sharing still corrupts the text. On the machine itself, works ok, over sharing fails.

  2. It seems the one that works uses punctuation rather than a letter. Creating new macros with ctl opt cmd - or = works fine. But having tried about 8 different letters, they all fail. The ones with letters paste corrupted text over sharing.

  3. Adding a new macro using a letter directly on the second machine will work fine over screen sharing. If you add the same macro on the main machine with the same hot key (with letter), the text will then be corrupted over screen sharing.

Further testing shows that the command key is causing the problem. My workaround is to not use the command key in hot keys in my macros to prevent issues during screen sharing.

Forget that last post. Still having the issue even with out the command key.
I am a t a loss to get this working properly over screen sharing.
It seemed to be working, then I tried syncing, and it stopped working.
Turned off syncing but still had the problem.

The critical factor here is that you are doing this through Screen Sharing.

On my setup inserting text in the remote machine via a Keyboard Maestro Macro doesn't work reliably through Screen Sharing. I have just done a few tests. Sometimes it works and sometimes the text is garbled. Using "Insert Text by Typing" seems to work better than "Insert Text by Pasting", but even then mistakes get made.

As "Screen Sharing" is an App I suppose Keyboard Maestro is telling "Screen Sharing" to insert the text, rather than telling the remote App to insert the text directly. The fact that Keyboard Maestro is also running on both machines and is using the same hotkeys is probably confusing things more.

Okay - yes, this is what seems to be happening:

The hotkey is firing the Macro on Mac 1 and inserting the text through the Screen Sharing App to Mac 2. And through that process, the text is somehow getting garbled.

One "solution" is to quit the Keyboard Maestro Engine on Mac 1. This forces the hotkey to fire the Macro via the copy of Keyboard Maestro that is running on Mac 2. This inserts the text correctly. This is not really a practical "solution" but it does point to what is going on.

A second "solution" is to have your text inserted by typing and to slow down that typing (this seems to stop the typing tripping over itself when inserted via Screen Sharing). There is a Keyboard Maestro Action to slow down typing on a Macro by Macro basis. The Action is called "Set Action Delay" and you set it to "Simulate Normal Keystroke delay" for "for this Macro" and type in a value like 0.03

Tried the delay but no amount of delay helped. There was less garble, but still garbled. Paste or typing act the same.

There is still the curious fact the macros with '-' and '=' work fine, but others fail. Those get passed on to the other machine with no interference.

My current solution is to have two different sets of hotkeys for the two macs. One less modifier on one of them. Not ideal.

I wonder if KM could check if screen sharing is the app, and let all hotkeys pass through as a solution.

Have you tried setting the macro's Group to "Available in all applications except: Screen Sharing"?

1 Like

Excepting Screen Sharing simply consumes the hot key, thus does not pass it on to the second mac.

It's actually exactly the opposite -- excepting an application means that app will get the hotkey combo.

Try it yourself -- make a "Test Swallow" Group in KM, set that to be active in everything except TextEdit. Make a "Swallow Test" macro in there with a ⌘V hotkey trigger and a single "Swallowed!" Display Text action. If you now ⌘V in eg Word you'll get the dialog, but in TextEdit you'll trigger the usual Paste command.

You'll see from other Forum threads that Screen Sharing, other remote access apps, and VM apps like Parallels are somewhat pernickety when it comes to passing meta keys. You might be running into something similar here. I'll try and have a play later, but last time I looked at this the results were very app and OS version dependent -- so anything I get to work may not work for you :frowning:

Yes @Nige_S, I can confirm that this does work. I've just tried it. By doing this the hotkey is passed onto the copy of Keyboard Maestro that is on the remote computer and the text is expanded correctly.

No, the opposite happens. Keyboard Maestro's hotkeys are ignored by Screen Sharing and the hotkey gets passed to the remote computer and if that computer has a running version of Keyboard Maestro, that local Macro is fired.

Tried again and discovered I had made an error in my test. You are right and that fixes the problem!!! Thanks so much for your help!

1 Like