# "Move Window To Desktop #"-action setting not working

**URL:** <https://community.folivora.ai/t/move-window-to-desktop-action-setting-not-working/40133>\
**Category:** Bugs or Unexpected Behavior\
**Tags:** spaces, window-management, desktop\
**Created:** [November 5, 2024, 3:26pm UTC](https://community.folivora.ai/t/move-window-to-desktop-action-setting-not-working/40133 "2024-11-05T15:26:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![PatrikG](https://community.folivora.ai/user_avatar/community.folivora.ai/patrikg/32/33907_2.png) [@PatrikG](https://community.folivora.ai/u/PatrikG)\
**Post date:** [November 5, 2024, 3:26pm UTC](https://community.folivora.ai/t/move-window-to-desktop-action-setting-not-working/40133/1 "2024-11-05T15:26:04Z")

</div>

When the "Only Move Window, Do NOT Switch To Space"-setting – in the "Move Window To Desktop #"-action – is checked nothing happens.

I tested both in alpha and in the latest stable release

**Device information:**

- Type of Mac: Macbook Pro M1 Max
- macOS version: 15.1 (24B83)
- BetterTouchTool version: 4.839

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [November 5, 2024, 3:36pm UTC](https://community.folivora.ai/t/move-window-to-desktop-action-setting-not-working/40133/2 "2024-11-05T15:36:53Z")

</div>

Unfortunately this only works up to and including macOS 14. Unfortunately Apple has blocked all remaining ways to achieve this on macOS Sequoia.

I'll make sure to hide the option soon.

---

<div class="post-metadata">

**Author:** ![justinrr](https://community.folivora.ai/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@justinrr](https://community.folivora.ai/u/justinrr)\
**Post date:** [January 31, 2025, 9:19pm UTC](https://community.folivora.ai/t/move-window-to-desktop-action-setting-not-working/40133/3 "2025-01-31T21:19:38Z")

</div>

FWIW, I created this work around.

Note: it doesn't prevent the moving to the target space for the window; but it does instantly revert you to the original space after the window has been moved to the target space.

Note: Requires installation of WhichSpace app, from: [macos - osx - script to get current desktop number - Stack Overflow](https://stackoverflow.com/questions/34659893/osx-script-to-get-current-desktop-number)

Note: Requires "Switch to desktop..." shortcut keys to be enabled in the Mission Control section of the Keyboard Shortcuts section of the Keyboard System Settings. There may be a way to more elegantly switch to a space, programmatically, but having trouble finding it. Seems Spaces scripting is very un-developed by Apple.

Note: the delays included in the script may need to be adjusted for your machine to achieve optimal performance.

Instructions: For whatever trigger you've selected, after the "Move Window to Desktop X" action, create a "Run Apple Script" action, with the following AppleScript code:

```auto
tell application ¬
	"System Events" to tell process ¬
	"WhichSpace" to set WhichSpaceDump to (title of menu bar items of menu bar 1)
set SpaceNum to item 1 of WhichSpaceDump

delay 0.1

--Delay switching back to original space until the BBT menu has been activated and resulted in a change of space
tell application ¬
	"System Events" to tell process ¬
	"WhichSpace" to set WhichSpaceDump to (title of menu bar items of menu bar 1)
set CurrentSpaceNum to item 1 of WhichSpaceDump

repeat until CurrentSpaceNum is not SpaceNum
	tell application ¬
		"System Events" to tell process ¬
		"WhichSpace" to set WhichSpaceDump to (title of menu bar items of menu bar 1)
	set CurrentSpaceNum to item 1 of WhichSpaceDump
	delay 0.1
end repeat

delay 0.1

if SpaceNum is "1" then
	delay 0.1
	tell application "System Events" to key code 18 using {control down}
end if
if SpaceNum is "2" then
	delay 0.1
	tell application "System Events" to key code 19 using {control down}
end if
if SpaceNum is "3" then
	delay 0.1
	tell application "System Events" to key code 20 using {control down}
end if
if SpaceNum is "4" then
	delay 0.1
	tell application "System Events" to key code 21 using {control down}
end if
if SpaceNum is "5" then
	delay 0.1
	tell application "System Events" to key code 23 using {control down}
end if
if SpaceNum is "6" then
	delay 0.1
	tell application "System Events" to key code 22 using {control down}
end if
if SpaceNum is "7" then
	delay 0.1
	tell application "System Events" to key code 26 using {control down}
end if
if SpaceNum is "8" then
	delay 0.1
	tell application "System Events" to key code 28 using {control down}
end if
if SpaceNum is "9" then
	delay 0.1
	tell application "System Events" to key code 25 using {control down}
end if
if SpaceNum is "10" then
	delay 0.1
	tell application "System Events" to key code 29 using {control down}
end if
if SpaceNum is "11" then
	delay 0.1
	tell application "System Events" to key code 18 using {control down, option down}
end if
if SpaceNum is "12" then
	delay 0.1
	tell application "System Events" to key code 19 using {control down, option down}
end if
if SpaceNum is "13" then
	delay 0.1
	tell application "System Events" to key code 20 using {control down, option down}
end if
if SpaceNum is "14" then
	delay 0.1
	tell application "System Events" to key code 21 using {control down, option down}
end if
if SpaceNum is "15" then
	delay 0.1
	tell application "System Events" to key code 23 using {control down, option down}
end if
if SpaceNum is "16" then
	delay 0.1
	tell application "System Events" to key code 22 using {control down, option down}
end if

```

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [January 31, 2025, 9:25pm UTC](https://community.folivora.ai/t/move-window-to-desktop-action-setting-not-working/40133/4 "2025-01-31T21:25:16Z")

</div>

unless I miss something, this can't do what the "Only Move Window, Do NOT Switch To Space" option did. It moved a window to a different space without actually switching to that space. (Unfortunately Apple blocked that on current macOS)

The standard move window to space actions should still work in BTT.

---

<div class="post-metadata">

**Author:** ![PatrikG](https://community.folivora.ai/user_avatar/community.folivora.ai/patrikg/32/33907_2.png) [@PatrikG](https://community.folivora.ai/u/PatrikG)\
**Post date:** [February 1, 2025, 12:56pm UTC](https://community.folivora.ai/t/move-window-to-desktop-action-setting-not-working/40133/5 "2025-02-01T12:56:46Z")

</div>

Thanks for the info Andreas! It's sad Apple blocks stuff like this 😕  
And sorry for the slow response to your quick one 🙏

---

<div class="post-metadata">

**Author:** ![PatrikG](https://community.folivora.ai/user_avatar/community.folivora.ai/patrikg/32/33907_2.png) [@PatrikG](https://community.folivora.ai/u/PatrikG)\
**Post date:** [February 1, 2025, 12:59pm UTC](https://community.folivora.ai/t/move-window-to-desktop-action-setting-not-working/40133/6 "2025-02-01T12:59:59Z")

</div>

Cool that you shared this workaround (even though if it's not as fast as what we had before, and may trigger automations on the way). Thanks!

---

<div class="post-metadata">

**Author:** ![tistos](https://community.folivora.ai/user_avatar/community.folivora.ai/tistos/32/22626_2.png) [@tistos](https://community.folivora.ai/u/tistos)\
**Post date:** [May 15, 2025, 3:15pm UTC](https://community.folivora.ai/t/move-window-to-desktop-action-setting-not-working/40133/7 "2025-05-15T15:15:09Z")

</div>

> [@Andreas\_Hegenberg](#):
>
> I'll make sure to hide the option soon.

Hiding this option would indeed be quite useful. I just spent an hour trying to get it to work...
