Desktop Spaces • Macros for Navigation and Window Management

On my MacBook Pro I use up to 15 Desktop Spaces. With several, I’ve assigned applications to specific spaces, e.g., I’ve assigned Messages to Desktop 3. With the relatively small footprint of a laptop, the combination of multiple Desktop Spaces and keyboard shortcuts greatly reduces the time and mousing required to manage windows.

Although space-assignment for some apps is certainly beneficial, there are times when windows from these apps need to be visible on other spaces. Movement of such windows with native macOS features is somewhat clumsy, and certainly not done quickly.

Keyboard Mastro, and this set of macros, can greatly assist with this macOS shortcoming and other common Desktop Space tasks even if only a few Desktop Spaces are being used.

[ continued on the Keyboard Maestro forum ]


@jim_sauer I haven’t had a change to digest your macros yet, but I must say, well done and very useful! Automating Spaces and window movement among them is a real problem with MacOS as there is no built-in scripting or framework support, so your work is likely to be very helpful to a lot of folks!


@nlippman, thanks for your comment.

It seems that Desktop Spaces (a.k.a, virtual desktops) are not commonly used on macOS, maybe because it is a feature that clearly is not fully developed by Apple. If you read on you’ll see that the the KM Developer, Perter Lewis, states that the current Desktop Space number is not available via an API; thus there are no Keyboard Maestro macro actions related to Desktop Spaces.

For those of you that do use Desktop Spaces, even if you don’t use Keyboard Maestro, I recommend that you take the time to download and install the open source tool named WhichSpace; it has one simple, but very useful, feature: it displays the Desktop Space number in the macOS menubar.

1 Like

Thanks @jim_sauer for these. Will have a play with them. I use Spaces a lot but only have 6 so feel a lightweight compared to your 15! :joy: