6

Mission Control allows for multiple desktop (spaces). Does there exist a keyboard shortcut for moving an application's window from one to another?

0

4 Answers 4

7

You can hold the window with your mouse and use the usual keyboard shortcuts to move the window across desktops.

1
  • Works in Ventura. This is the best compromise I can find without extra software. BetterTouchTool's download page gave me a 404. Commented Dec 19, 2022 at 17:26
3

No, but you can use a third party application, like BetterTouchTool, which allows you to bind key combinations to user defined actions, including moving windows between spaces.

1
  • This is the best solution I have found. In BetterTouchTool's preferences, choose "Add New Shortcut.., and then choose "Move Window One Space/Desktop Left|Right" from "Trigger Predefined Action" Commented Aug 14, 2017 at 16:33
2

This requires you to use the touchpad or mouse, but: Hold the window (at the top bar) with your touchpad or mouse and use Control-1, Control-2, Control-3, etc. to move a window to another space. ( control is the ^ key).

1
  • This shortcut can also be customized in System Settings->Keyboard->Keyboard Shortcuts->Mission Control->Mission Control. Commented Jun 15, 2023 at 23:24
1

I wrote a blog post on how you can use a hammerspoon script to move windows around spaces with just shortcuts on macOS: Install hammerspoon and add the following script to your init.lua:

-- Set up the logger local log = hs.logger.new('WindowMover', 'info') -- Function to get spaceId by space name function getSpaceIdByName(spaceName) local spaceNames = hs.spaces.missionControlSpaceNames() for uuid, desktops in pairs(spaceNames) do log.i("UUID: " .. uuid) -- Log the UUID for index, name in pairs(desktops) do log.i("Index: " .. index .. ", Name: " .. tostring(name)) -- Log the index and name if name == spaceName then log.i("Found spaceId for " .. spaceName .. ": " .. index) return index end end end log.w("Space not found: " .. spaceName) return nil end -- Function to move focused window to a specific space function moveFocusedWindowToSpace(spaceNumber) local spaceName = "Desktop " .. spaceNumber log.i("Attempting to move window to " .. spaceName) local spaceId = getSpaceIdByName(spaceName) if spaceId then local focusedWindow = hs.window.focusedWindow() if focusedWindow then log.i("Moving window " .. focusedWindow:title() .. " to spaceId " .. spaceId) hs.spaces.moveWindowToSpace(focusedWindow:id(), spaceId) else log.w("No focused window") hs.alert.show("No focused window") end else log.w("Space not found: " .. spaceName) hs.alert.show("Space not found: " .. spaceName) end end -- Bind keys cmd + shift + 1-6 for i = 1, 6 do hs.hotkey.bind({"cmd", "shift"}, tostring(i), function() log.i("Hotkey pressed: cmd + shift + " .. i) moveFocusedWindowToSpace(i) end) end 

https://konradstaniszewski.com/blog/windows-between-spaces

This is a small script, and can be customized to use whatever shortcuts you want.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.