KM not Sending Shortcuts to Magnet

I'm using Magnet for window positioning onscreen. I have a set up KM macros to allow me to use Magnet's positioning as palette buttons, but some of them aren't working.

For instance, in Magnet, pressing Control+Option+Right Arrow resizes the front window to half-width, full-height of the screen and on the right side. Physically pressing that keyboard shortcut on my keyboard does what it's supposed to, but when I try to send that shortcut via a KM macro, it fails. It's one of several that fails, though many do work.

In this macro, both the Display Text actions fire, so KM must be sending the simulate keystroke action, though nothing happens to the front window application (Word, Finder, Chrome, others I've tried).

Is there a better way to make sure the keyboard shortcut is received by Magnet app without losing focus on the front window of the application I'm trying to resize?

Sorry, I don't have a direct answer/solution for your issue.
I can say that if Magnet (or any app) is using non-standard windows, KM will likely have trouble directing output/actions towards that window.

IAC, KM has extensive window manipulation actions.
Here's a macro set as an example:

Macro Set: Windows Management Palette

Thanks. I used to use the Windows Management Palette, but Magnet had a few extra features I wanted, like adjusting commands automatically between my horizontal iMac and my two vertical side monitors.

Hi @iampariah, have you already tried to assign the shortcut to the Magnet App like in this example?

Hi @appleianer I tried that, but it still has no effect on the front window of anything.

@peternlewis Why would some keyboard shortcuts work when sent by KM to Magnet but others not when they all work when the physical keyboard keys are pressed?

After posting the below screenshots I noticed its all the shortcuts with arrows that fail from KM. Did I define the Simulate Keystroke action correctly in KM for the arrow keys?

Here's some screenshots of Magnet, if they make a difference.

Screen Shot 2020-08-25 at 13.12.16

I downloaded the app once and the shortcut in your KM macro does not work for me either.
If I enter the shortcut via the keyboard, it works in the Magnet app
With this AppleScript I was successful:

tell application "System Events" to tell process "Magnet" to key code 124 using {option down, control down}

2020_08_25_Support_1

1 Like

It is a bug/feature introduced in Catalina.

Specifically:

Catalina doesn't support triggering hot keys with simulated keys for function keys or arrow keys, but weirdly does allow it for other keys. Whether this is a bug or a “feature” is unknown. If you can change the target hot key to something other than an arrow or function key, then Keyboard Maestro can trigger it based on simulating the key.

1 Like

That did it! Thank you so much!

1 Like

Now my iPad window mover console is finished and functional.

2 Likes

Nice work! I see that this is a meta grid view. Would you consider posting it somewhere? I’m trying to do the same thing, just having started using that program with KM macros. It’s fantastic by the way!

1 Like

@mpom I don't use the app myself (I rather use Siri shortcuts for it), but maybe the YT channel will help you

a little further.

Hi, @mpom

I'd be happy to. I started a new topic here with my downloadable macros: Magnet-based Window Movers & Sizers

1 Like

Thanks, this works like a charm! It was surprisingly easy to also figure out the coordinates of the non-Magnet actions (Monitor LEFT, Monitor CENTER, Monitor RIGHT). Well done.

1 Like

Thank you!