A small Windows utility for moving the active window to the previous or next virtual desktop.
Default hotkeys move the current active window:
Ctrl+Alt+Shift+Left: move the active window to the previous virtual desktopCtrl+Alt+Shift+Right: move the active window to the next virtual desktop
The tray menu also has Move Left and Move Right commands. Because opening the tray menu takes focus away from the window you want to move, these commands arm a one-shot action: click the window you want to move, and that clicked window is moved left or right.
After moving a window, the utility follows it by switching to the destination desktop.
dotnet run --project .\MoveToVirtualDesktop\MoveToVirtualDesktop.csprojThe app runs in the notification area. Use the tray menu to move the next clicked window or exit.
dotnet publish .\MoveToVirtualDesktop\MoveToVirtualDesktop.csproj -c ReleaseThe installer build requires Inno Setup 6. The MSBuild target publishes the Release app and compiles Setup.iss:
dotnet msbuild .\MoveToVirtualDesktop\MoveToVirtualDesktop.csproj /target:CompileInstallerOnReleaseBuild /property:Configuration=Release /property:CompileInstaller=trueThe installer is emitted at:
installer\MoveToVirtualDesktopSetup.exe
In VS Code, use the Installer launch profile or the build installer task.
After updating MoveToVirtualDesktop\Assets\MoveToVirtualDesktop.png, regenerate the Windows .ico with:
.\scripts\Regenerate-Icon.ps1Windows does not expose a complete stable public API for enumerating and switching virtual desktops. This project keeps those calls isolated in MoveToVirtualDesktop/Interop/VirtualDesktopService.cs and uses the Windows 11 24H2 virtual desktop COM interface shape documented by the existing open-source virtual desktop tools.
Interface references used while building this: