Drag window with middle mouse button from anywhere in the window

Is it possible to configure KM to allow me to middle-click-drag anywhere in a window to drag the window somewhere else.

That's an interesting question. I might be able to do it, but it probably wouldn't be as smooth as a window normally moves when you use the left mouse button on the title bar, because my macro would introduce a little lag. Is perfect smoothness important to you? If so, you may want to consider a different utility.

I know of one such utility, namely Moom.

Oddly, we only have that feature thanks to a friend from my Macworld days, who harped on us for years to add it (as the app he used to use to do that stopped working). You can both drag and drag-resize from anywhere in the window using any defined modifier key(s) you'd like to use.

I once tried writing something similar in Keyboard Maestro, just to see what it would take, and the end result wasn't pretty—very jerky when trying to react to cursor location and move a window every time the mouse moved.

To do this well, you really need to use the Accessibility API, and while that may be possible using one of Keyboard Maestro's script actions, I wouldn't know the first thing about how to do it.

-rob.

1 Like