Move Window with a Modifier Key and Mouse Movement

I'm trying to move the frontmost window by simultaneously holding a modifier key and moving the mouse, but without clicking. The macro below works, but is janky at best.

Any ideas on how to improve the reliability?


If Then Else.kmactions (2.9 KB)


Just hoping someone might have any ideas on how to make this perform a little more smoothly. Thanks.

Hey Paul,

Buy a utility designed for that sort of thing? Which I'm sure is not what you wanted to hear.

You'd need to dig into the macOS at a level lower than Keyboard Maestro does to perform that sort of job really well.

I've seen a few mouse drivers and other utilities over the years that were adept at this ā€“ but I'm not keeping track of utilities the way I used to and I don't presently have any favs.

This one came up on a cursory Google search and is inexpensive:

If I was going to buy such a thing I'd do a much more intensive search of course.


1 Like

Hey, Chris.

Thanks for replying and for the suggestion. I actually own a similar app already. This is more of a self-inflicted challenge for my KM programming skills. My resize window macro works much better than my move macro. I figured I might encounter an OS/KM limitation at some point.

I did notice that when instructing KM to move a window, the Console log shows entries like this:

This might have something to do with the jankiness of the performance.

Thanks, again.

@paulcristo what KM is for macro editing, BetterTouchTool is for everything related to input devices.
I control to my KM palettes/macros 90% via a BTT gesture control, without using a shortcut etc.

Here is my application in BTT for your request:

Wow @appleianer again you have shown me something I didn't even know I had. I got BetterTouchTool just to make the TouchBar more useful on my MacBook Pro and didn't look into all the other things it can do. I'm going to spend some time looking into all these other features - but for now that window sizing and dragging thing without a shortcut and just having the mouse pointer anywhere over the window is so cool I can see I'm going to wonder how how I managed before... In fact it feels like this should just be built into Mac OS anyway.

1 Like

But I feel the same way @Zabobon.

I learn something new every day. Especially since with the app updates always come new features that are waiting to be optimized with KM, in combination with other tools / apps :wink:

1 Like

Before I purchase the BetterTouchTool, I used their free product BetterSnapTool for years. It was designed for exactly what the OP is asking for.

BetterTouchTool integrates all functions that BST has.

1 Like

@Zabobon in Germany they say: "... the eye always eats with you".

I have combined the app DeskCover Pro with BetterTouchTool. You don't have to do that, but it helps me immensely in Dark Mode :wink:

Shared with CloudApp

I use the shortcuts from BetterTouchTool and via KM I activate/deactivate the DeskCover Pro app with one mouse click.

1 Like

Through which mechanism does BetterTouchTool move the windows? How does it actually interface with macOS?


Unfortunately, I can't answer that. I can only show you the settings:

You can ask the BTT community

Not much info here:

But you might find more by searching the forum for:

"more than 50 simultaneous macros"


Thanks, Chris. I did some more experimenting and was able to get a workable macro that accomplishes my goal. See attached:

move window.kmmacros

1 Like