MACROS: Desktop Spaces • Macros for Navigation and Window Management, v1.1 (Superseded)

@xsmk, I added this comment into a Read Me First file that is downloaded with v1.1 of the macros.

Thanks again for your feedback!


I've updated the Desktop Spaces • Macros for Navigation and Window Management macros to v1.1. I've also simplified the installation process.

The macro changes are somewhat minor; if you have previously installed the macros and they are working as expected, you can ignore the updates.

See the Version History for more information.

1 Like

Makes complete sense. Thank you for the thoughtful reply.

1 Like

When I attempted to install the macros, for simplicity I decide to only do Step 5.a. and omit the optional steps 5.b and 5.c.

Nothing worked. Nada.

I started poring over the macros, trying to trace out the problem and got nowhere. Then I noticed that the .sys Desktops folder was greyed out in the KBM editor. Huh? I distinctly remembered the instructions saying that it was installed in an "ENABLED" state.

Oh! The text says that each of the macros will be enabled. And Lo! And Behold! There's Step 6 as a single line, hiding under the palette screenshot, camouflaged as an image caption. Clearly the instructions are correct, but subject to misinterpretation (at least for one data point).

May I suggest that in Step 5a, where you say,

that you also say, "The .sys Desktops groups is initially disabled and will be enabled in Step 6."


1 Like

@August, thanks for the feedback. I've removed Step 6 and modified Step 5a:

[ Required Step ] Open subfolder 1 - Required. Double-click 9 Primary Macros.kmmacros to install the primary macros. Note that the macros will individually ENABLED; but the macro group .sys Desktops will be DISABLED. When ready to use the macros, enable this group.

If you encounter any issues, I strongly suggest you do Step 5b—WhichSpace is really a handy tool even if you aren't using these macros.

Also, for single-hand operation, the Conflict Palette (Step 5c) will really be helpful. As you become more familiar with the mechanics, you might choose to operate some (or all) of the underlying macro directly (i.e., without the Conflict Palette).

Thanks. I've already installed them.

1 Like

I'm confused about how many different hotkeys there are for each Desktop/Workspace and why, and what might happen if I change them.

In System Preferences > Keyboard > Shortcuts > Mission Control there is a hotkey set for Desktop 14. Following the above installation instructions, I changed that to Control+Option+Shift+Command+4. I didn't think that would be a problem.

But it turns out that Control+Shift+Command+4 is used to move a window to Desktop 14. Feh!

Shift+Command+4 is the system hotkey to grab a screenshot of either an area on the screen or a whole window, that choice toggled by the spacebar. It gets saved on the desktop. However, if you add Control to the hotkey, Control+Shift+Command+4 saves the captured image to the system clipboard instead. That's very useful. I now use that version more that the saved file version.

But these desktop spaces macros break that. There is not any menu option to any standard app that does the function that Control+Shift+Command+4 does.

My original idea was to simply remove the hotkey macros and rely on the Conflict Palette instead. But the way the macros are organized, the conflict palette uses the hotkeys to execute the action. The various hotkeys all trigger the same macro and the macro decides which window to go to depending on the trigger value. The various Conflict Palette options simple each generate the corresponding hotkey which then runs the actual macro. So to use only the Conflict Palette would require a complete reorganization of that, which seems prohibitively complicated.

Has anyone else encountered this, and if so, what did you do about it?

Hi @August. As for the why, please refer to one of my above comments.

After reading the above comment, you probably understand why that change, made along, caused a problem. If you made the necessary changes within the macros to accommodate your change, then everything would work. That would be some work, but if you want to try, I'd be happy to help.

I have a suggestion:

  1. Temporarily change the screenshot shortcuts using:

(As you can see, I don't use the default screenshot shortcuts. That's because I use another tool called CleanShot X. It's part of Setapp.)

  1. Then carefully follow the instructions I provided above (without making changes).

Then use and evaluate the macros for a day or two and decide:

  1. they are not worth the trouble; discard them and restore your screenshot settings, or

  2. if you decide they are helpful, then you have two choices: a) retrain your muscle memory for screenshots and leave the macros as is, or b) make the necessary changes to the macros as I mentioned above.

Yes, the optional palette leverages the underlying macros, it does not replace them. But it also helps as you are learning the hot keys that trigger them. It is intended for beginners and occasional users.

Maybe, but no one before you has mentioned it to me.

Thanks! I had not seen the Screen Shot shortcuts list before. The whole Shortcuts menu has been reorganized; it used to be all one list and now it's several.

As for getting used to your system, I'm contemplating what it will take to use these ideas/principles/structures to switch desktops using my CurrentKey naming instead of the OSX Mission Control numbers. The useful thing to me that with the named "Rooms" (as distinct from Desktops because of the extra level of abstraction), I can rearrange the order of the desktop to put the ones I'm working with right next to each other so that I can go back and forth with Ctrl+[Left|Right]Arrow.

Using CurrentKey Naming also lets me use hotkeys or Conflict Palette entries that are mnemonic, V for Video, T for To Dos, Q for Queued Tasks, F for Facebook, K for KBM, etc. And those letters have nothing to do with the order of the desktops within Mission Control.

If you only have four or five desktops, it's easy to memorize what you have where by position. But with more than seven or maybe nine, you're very likely going to need mnemonics to keep track of them. With 16 it's a certainty.

I tried the Screenshot and Recording Options hotkey, by default Shift+Command+5, thinking it might be a one-stop shop that could have one hotkey for all the different screencapture options. No luck. In fact, it broke my computer!

See Screenshot highlighted box doesn't go awa… - Apple Community for details. I'm going to try the recommended Safe Boot fix now. Feh!

Wow, that sounds like an odd macOS bug. Seems like a Safe Boot would be a good step to take. If for some reason you can’t use the System Preference, you might be able to use a Terminal command to change the setting.

What version of macOS are you using? What Mac model?

I don't know that I have the same bug as reported in that Apple Support item. It sounded exactly the same, except that I didn't try rebooting, so I don't know that a normal reboot would not make it go away. I was on the verge of trying that, but I was slow to do that -- I hate having to reboot because all my open windows from all my desktops, except TextEdit, Finder, and Terminal, end up being restarted in Desktop1. I was finally able to make it go away without rebooting by opening the ScreenShot control panel with Shift+Command+5 and noticing that there was a button that said "Stop Recording". I had not knowingly started a recording, but when I clicked that button, the highlighted box went away. I also found a .mov file on my desktop that was nearly 2 gigabytes with over four hours of screen recording of the contents of that box, as various app windows came and went, as I changed desktop workspaces, etc. So it's fixed.

1 Like

@_jims I downloaded your macros (thanks for all the hard work here) and made the modifications you requested, including running WhichSpace and I'm not having success with the macros.

I'm on an M1 Mini, running Monterey

When I trigger "Go left a desktop" that works fine.

But if I try Move Application Window to Current Desktop it switches to the desktop where that application is and stays there.

When I try Move Window to Desktop N the mouse moves to the top of the window then moves back to the prior position. Nothing changes desktops.

Ideas for where to look? How can I debug?

Thanks for any help you can offer.

Hi @blfarris; sorry that you've run into some difficulty.

Although I used the above set of macros for many months (with High Sierra on and iMac, Mojave on a mini, and Monterey on a MacBook Pro–Intel), I've superseded them with an improved set of macros: Desktop Spaces • Macros to Improve Navigation and Window Management, v1.1

Sorry if you missed that note above in the Version History section.

Because I don't plan to upgrade the above macro set, I've decided to only support the improved macros. If you install them, I'd be glad to help you troubleshoot if you encounter any issues.

Hey, I'm trying to use the macros, but I'm running into some issues. It seems that none of the desktops/Windows work for me, despite a successful installation of WhichSpace and configuration of settings. Here are the errors I receive, including "go left" and "go right".

I am on version 10.2 of KM, Ventura 13.4, Mac Mini M1. I use a TWM day-to-day and all my spaces and windows settings work fine, and I was looking to include those macros in some of my macros to manipulate windows and spaces when launching apps.

I tried troubleshooting on my own, but I was unsuccessful. I'd appreciate any help!

Hi @szfkami. Sorry you are having difficulty. Here's what I suggest:

  1. Delete the macro group that includes the macros from this thread. That will delete all of the macros within.
  2. Go to this thread and carefully follow all of the instructions: MACROS: Desktop Spaces • Macros to Improve Navigation and Window Management, v1.1

When others have had difficulties it's generally related to the macOS settings. Pay careful attention to the Keyboard Shortcuts.

I fixed the issue; it was related to the keys I assigned to the actions on the OS. They did not match the ones in the macro, as I already use a TWM with different modifier keys than the ones in the macro. I didn't see a mention of how to change the default keybindings to match my existing ones in the post?

I'd like to do that, and I haven't found a way.

It's doable, but not trivial and not recomended. The is one group of actions in several macros that would need to be modified. Once that group is changed in one, it could be copied to the others.

Okay, just one more thing. I installed the macro and intended to use those macros in my other macros, not as an actual TWM for my productivity, because I already have one.

So do the macros work at all unless the shortcuts on them match the system shortcuts? I think that,

If it's as you say, I probably can't use them. I thought of using them instead of "Type Keystroke" actions with the shortcuts used for my TWM, because those were not reliable.

My use case would have been doing window and space management for specific applications that are launched by a macro. So I could open an app, move it to space 2 or 4, all within the macro.

So, I'm not sure and a little perplexed now. What do you think?