Move Window 1 Space Left/Right or to Different Desktop

These macros are a nice workaround to Keyboard Maestros inability to interact with spaces on Mac OS X. They are pretty simple but very useful if you use multiple desktops, the one thing you must do for these to work, however, is in System Preferences you must have the Move Left a Space and Move Right a Space shortcuts enabled in the Keyboard preferences panel.

So whatever shortcut you put in there you will also use in the macro, as you can see below.

Note: the pause after that action is important, and .3 seconds is the minimum I could get in order for the window to actually let go, if the pause isn't there the window will continue to move spaces as you move.

You can also use this macro to move a window to a particular desktop, you just have to adjust the shortcuts, I set it up so that in the keyboard preferences the keyboard shortcut to move to a particular desktop is kind of awkward because I don't actually press it, Keyboard Maestro does it for me in the macro.

Hope you like!

  • Kevin

Move Windows 1 Space Left:Right.kmmacros (15.7 KB)
Move to Particular Desktop.kmmacros (23.4 KB)

1 Like

Yes this works nicely! I’m using a very similar Macro, with 2 simplifications:

  • you can use %CurrentMouse% to get the mouse position
  • You can combine the mouse movement, clicking and holding into one action

If you use a “While” condition for the Space movement you can move through the Spaces without repeatedly pressing ⌃⌥Arrow

PS: I also ended up with exactly a 0.3s pause. The “non-sticky window” issue is also present without the macro: Hold a window with the mouse (manually), press ⌃2 and almost immediately release the mouse button. The window will go back to the old Space later. This seems to be a OS bug.


Very nice! I’m going to make those adjustments, good call!

12 posts were split to a new topic: Image Annotation

LOL, just noticed that this thread has gone completely off topic… since May 14 :no_mouth:

Good point, Tom. Thanks for pointing this out.
I just moved all of these topic to a new topic:

Footnote: BetterTouchTool has actions for “Move Window One Space/Desktop Left” and “… Right”.

Yes. Certainly inspired by the macros here :wink: