PowerToys
PowerToys copied to clipboard
Moving a program with you to another virtual desktop
One of the thing I've found lacking ever since I started using the virtual desktops is the ability to move a window with you while moving to another virtual desktop.
Currently, we can move to another desktop using the shortcut ctrl + win + left/right, I feel like a shortcut along the lines of ctrl + win + alt + left/right could be used to make the current active window move with you to the next desktop
I have no idea if this fits as a powertoy, please tell me if it doesn't !
I currently use Virtual Desktop Enhancer to that effect. It's no longer maintained, but still works. You can configure keyboard shortcuts to move the currently focused program to an adjacent desktop, either with you or without changing desktops yourself.
I personally have set Ctrl + Alt + Win + Left/Right to move a program without switching and Ctrl + Shift + Win + Left/Right to take a program along.
An existing alternative to virtual desktop enhancer, MoveToDesktop, is not archived, though it is limited to this one virtual desktop feature (move window hotkey). For me it's indispensable, and would be great to have the feature natively!
for keeping stuff documented, https://docs.microsoft.com/en-us/sysinternals/downloads/desktops is one tool that had a basic UX for virtual desktops long ago
You can already do this with the standard virtual desktop, right click the window in the tab switcher and select show this window on all desktops.

You can already do this with the standard virtual desktop, right click the window in the tab switcher and select show this window on all desktops.
This isn't exactly the same thing (the proposal is mainly useful for when it comes to reorganising your windows using nothing but the keyboard) but it definitely helps for some cases
Ah toggle that setting on the active window, actually I really like that and would use that more often. Good call imo.
Note: #4298 is basically a duplicate of this idea, though it talks about "sending" a window to a specific virtual desktop rather than bringing it with when switching.
XMonad only has the concept of sending a window over, and then you switch over with the usual command. More useful that way I'd think, since I often want to "clean up" and send a window I don't want to close somewhere else.
Not to claim that this is the most useful post ever, but in my previous setup, I had a tool that did two things that I liked
- Move windows between desktop using
Win+Alt+Left/Right. Compated with the MoveToDesktop, this worked even when the app had already moved to another desktop - Show the name of the desktop when switching
I don't remember the name and I also cannot find it, hence my original remark of "not the most useful post ever". Sorry and if I find it I'll update here. It was certainly on github and worked as a portable as well. The app deserves much more visibility as well. If anyone knows it, please post as well because it would be a great base to discuss upon.
Not to claim that this is the most useful post ever, but in my previous setup, I had a tool that did two things that I liked
- Move windows between desktop using
Win+Alt+Left/Right. Compated with the MoveToDesktop, this worked even when the app had already moved to another desktop- Show the name of the desktop when switching
I don't remember the name and I also cannot find it, hence my original remark of "not the most useful post ever". Sorry and if I find it I'll update here. It was certainly on github and worked as a portable as well. The app deserves much more visibility as well. If anyone knows it, please post as well because it would be a great base to discuss upon.
One that does that (it uses WIN-key+1..20 to switch to desktops) is WS Virtual Desktop Tool, available on the MS Store . It too does transfer windows to a desktop with shortcuts. https://www.microsoft.com/en-us/p/ws-virtual-desktop-tool/9n5wrj22t733?activetab=pivot:overviewtab
One that does that (it uses WIN-key+1..20 to switch to desktops) is WS Virtual Desktop Tool, available on the MS Store . It too does transfer windows to a desktop with shortcuts. https://www.microsoft.com/en-us/p/ws-virtual-desktop-tool/9n5wrj22t733?activetab=pivot:overviewtab
Thank you. It was not from the store but a stand alone executable. Might have evolved to the paid app's link.
Since we're collecting... this one also provides the functionality: https://github.com/ViRb3/SylphyHornEx
And to follow krisrok's link, here's one that actually works on Win11. These obviously are just workarounds and it would be MUCH preferred to have a PowerToys version of the functions provided by these applications. https://github.com/hwtnb/SylphyHornPlusWin11
Since my ticket was closed as a duplicate, I think it's better to post it here.
The solution I found to achieve this relies in a AHK Script
Answer found here: https://superuser.com/questions/950452/how-to-quickly-move-current-window-to-another-task-view-desktop-in-windows-10.
I edited the keybindings from the original owner to ctrl + shit +win + left/right
^+#Left::
WinGetTitle, Title, A
WinSet, ExStyle, ^0x80, %Title%
Send {LWin down}{Ctrl down}{Left}{Ctrl up}{LWin up}
sleep, 50
WinSet, ExStyle, ^0x80, %Title%
WinActivate, %Title%
Return
^+#Right::
WinGetTitle, Title, A
WinSet, ExStyle, ^0x80, %Title%
Send {LWin down}{Ctrl down}{Right}{Ctrl up}{LWin up}
sleep, 50
WinSet, ExStyle, ^0x80, %Title%
WinActivate, %Title%
Return
Just compile it as an executable and put it on shell:startup
Interesting solution. Sending Keypresses to activate the shortcut is a bit hacky, but if it works it's nice :)
@renantmagalhaes nice job. worked. I would still love for it to be part of Powertoys
It's been 5 years since this was opened. Can we get an update on it's development?
If any maintainer has time, please take a look at it.
For reference, a working AHK v2's script is the following.
#Requires AutoHotkey v2.0
#SingleInstance force
ListLines 0
SendMode "Input"
SetWorkingDir A_ScriptDir
KeyHistory 0
#WinActivateForce
ProcessSetPriority "H"
SetWinDelay -1
SetControlDelay -1
#Include %A_LineFile%\..\VD.ah2
; wrapping / cycle back to first desktop when at the last
^#left::VD.goToRelativeDesktopNum(-1)
^#right::VD.goToRelativeDesktopNum(+1)
; move window to left and follow it
^#!left::VD.goToDesktopNum(VD.MoveWindowToRelativeDesktopNum("A", -1))
; move window to right and follow it
^#!right::VD.goToDesktopNum(VD.MoveWindowToRelativeDesktopNum("A", 1))
Reference: https://superuser.com/a/1850434/303655
We're reaching the 6th year anniversary of this issue 🥳. Unfortunately I am not allowed to use AHK on my work machine. Gnome/Ubuntu/Fedora has this simple feature for years 🥹
No in all seriousness, I like PowerToys a lot. Could we receive an update on its development? If any maintainer has time, please review it.
Almost six years in, PowerToys already handles proper tiling and other features—why not this as well?
Almost six years in, PowerToys already handles proper tiling and other features—why not this as well?
Well, the reason is that 'new' MS does not like to publish decent open win32 flat style API's for newer OS functionality. Mostly all functionality is hidden behind private API's that change their signature at random too.
Pinging this alive.
Well, the reason is that 'new' MS does not like to publish decent open win32 flat style API's for newer OS functionality. Mostly all functionality is hidden behind private API's that change their signature at random too.
Can this really be the reason we don't have the functionality? If AHK can do it, why shouldn't PowerToys, a Microsoft controlled set of addons be able to implement something for it?
Pinging this alive.
Well, the reason is that 'new' MS does not like to publish decent open win32 flat style API's for newer OS functionality. Mostly all functionality is hidden behind private API's that change their signature at random too.
Can this really be the reason we don't have the functionality? If AHK can do it, why shouldn't PowerToys, a Microsoft controlled set of addons be able to implement something for it?
AHK can only do it because a few of its users wrote code that uses those undocumented API's which can and will break at any update for no apparent dev reason. PowerToys does not want to rely on this once in a while changing behavior across Windows versions and update level. Ms doesn't even bother to update win32 windowing functions for new Windows behavior and the virtual desktop feature is mostly simple inaccessible and what is available is bare bones and mostly useless in any practical sense and only available for c++. And VD is (by far) not the only area where they make things needlessly difficult to achieve.
Isn’t this an official win32 function exactly for this purpose https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ivirtualdesktopmanager-movewindowtodesktop ?
Isn’t this an official win32 function exactly for this purpose https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ivirtualdesktopmanager-movewindowtodesktop ?
Neh, only works for your own process's windows. The API that handles all is not published for idiot reasons. And changed/changes frequently. And is a com object. What happened with flat win32 c style easily usable in any programming language?
Isn’t this an official win32 function exactly for this purpose https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ivirtualdesktopmanager-movewindowtodesktop ?
Neh, only works for your own process's windows. The API that handles all is not published for idiot reasons. And changed/changes frequently. And is a com object. What happened with flat win32 c style easily usable in any programming language?
Ok, thank you for explaining. We will keep on waiting, and maybe with time MS people will change their mind.
Can we do something that forces ms to look at this? like posting frequently on their forums or something? I don't think they will take notice otherwise.