Move Window Between Desktops

A free, lightweight AutoHotkey v2 script that lets you move the active window to the next or previous virtual desktop on Windows 10 / 11 with a single keyboard shortcut — a feature Microsoft should have included long ago.

The Problem

Windows 10 and 11 let you switch between virtual desktops with Ctrl + Win + arrow, but there is no built-in keyboard shortcut to move the currently focused window to another desktop. Your only option is to open Task View, then drag the window thumbnail with your mouse — slow, clumsy, and breaks your flow. This script fixes that.

Keyboard Shortcuts

Shortcut Action
Ctrl + Shift + Win + → Move active window right to the next desktop
Ctrl + Shift + Win + ← Move active window left to the previous desktop

Quick Start

Download for Windows 10 / 11

Latest release v1.2 from codeberg.org

Or install with Scoop (command line)
scoop bucket add fai-solutions https://codeberg.org/FAI-Solutions/scoop-bucket
scoop install move-window-between-desktops

Then run setup-autostart.ahk as Administrator to enable autostart. Get Scoop here!

Manual Install

  1. Download and install AutoHotkey v2 (if not already installed)
  2. Download move-window-between-desktops.ahk, setup-autostart.ahk and a matching VirtualDesktopAccessor.dll for your Windows build.
  3. Place all three files together:
    📁 MoveWindowBetweenDesktops/
         ├── move-window-between-desktops.ahk  (main script)
         ├── setup-autostart.ahk               (autostart configuration)
         └── VirtualDesktopAccessor.dll        (Windows API bridge)
  4. Run setup-autostart.ahk as Administrator — this sets up autostart and launches the script

💡 Tip: Running as Admin allows moving elevated windows (like Task Manager). Without Admin, the script works for regular windows only.

Troubleshooting

Windows Defender SmartScreen blocks the script

Downloaded .ahk files may be flagged as untrusted. Right-click each file → Properties → check Unblock at the bottom of the General tab → click Apply.

Nothing happens when I press the shortcut

Make sure AutoHotkey v2 is installed (not v1). Confirm all three files are in the same folder. Verify that your VirtualDesktopAccessor.dll matches your Windows build number (check Settings → System → About → "OS build").

Cannot move Task Manager or other admin windows

Some windows run with elevated privileges. Run setup-autostart.ahk and grant administrator permission when prompted. If you decline, the script still works for non-elevated windows.

Repository

The full source code, issue tracker, and release history is available on Codeberg: codeberg.org/FAI-Solutions/move-window-between-desktops