276

Windows 10 introduced Task View - the ability to have multiple virtual desktops. When I am in a window on Desktop 1, what's the quickest way to move it to Desktop 2?

Currently, I need to enter the task switcher (icon in the Taskbar or Win + Tab), find the window, and drag & drop it between desktops. It is inconvenient. Is there a quicker way?

8
  • 3
    This is how I do it and the only way I know how to do it. Press the Windows key + Tab . Press Tab again . This removes the outline from the active program thumbnail and Task View interface active. Use the arrow keys to move among the desktops on the Task View interface. When you have highlighted the desktop to which you want to switch, press Enter .
    – zain.ali
    Aug 4, 2015 at 11:40
  • 10
    Oooooo you can try WINKEY + CTRL + LEFT ARROW or WINKEY + CTRL + RIGHT ARROW
    – zain.ali
    Aug 4, 2015 at 11:43
  • 76
    This is not about navigating between desktops, it is about moving windows from one desktop to another. And yes, Ctrl+Win+left/right is cool :) Aug 4, 2015 at 11:49
  • 10
    When to expect a Windows build in hotkey for it? Apr 19, 2017 at 10:03
  • @Borek Does any of the answers satisfy you? Mar 10, 2018 at 17:03

16 Answers 16

188

I think for a quicker switch this should be in the titlebar, so I created a tool for that:

https://github.com/Eun/MoveToDesktop

enter image description here

You can also move windows by using WIN+ALT+Left/Right or change the shortcut as needed.

26
  • 10
    Yes! Finally!!! Thank you so much! :) As an Ubuntu user I was super excited about Virtual Desktops in Windows 10... but without this hotkey feature it felt useless. Now the feature is finally complete :) Thanks for your efforts and thanks for open sourcing it.
    – Adamski
    Apr 13, 2016 at 9:14
  • 8
    Download MoveToDesktop-X.Y.zip from the Releases section. In there is an .exe file, extract it somewhere and run it. No need for Visual Studio 2015. You might just need to install the Visual C++ Redistributable package.
    – Eun
    May 19, 2016 at 8:48
  • 8
    This tool did not work.
    – K Robinson
    Nov 4, 2016 at 16:10
  • 3
    wonder when windows will add drag and drop to the virtual desktops screen - that would be amazing
    – Mikey
    Dec 3, 2016 at 16:10
  • 3
    @Ninjakannon sorry, I should have been more specific. I mean to drag one window from any desktop to another - without having to switch to that desktop first, i.e. from the thumbnail windows. And also the ability to drag the virtual desktops around, to rearrange the order.
    – Mikey
    Dec 6, 2016 at 0:45
108

I also looked for that option, and from the searches I've made (I think that I also saw it on the Microsoft forums), it's not something that is available built-in at the moment.

The best way I came out with for now, to avoid using the mouse, is:

  • Winkey + tab for the desktops screen
  • Right click on the window you want to move.
    Use the right click keyboard button, or Shift + F10 if you don't have that key in your keyboard.
  • Choose Move to (or type M, because it's marked), and then the desktop you want (or N for new desktop, also marked)

This doesn't help that much, but that's what there is until someone develops something to make it easier.

Update: I've started looking into this. There's a registry value that changes when the app is moved between desktops. In that location, there are all the open apps:

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\SessionInfo\1\ApplicationViewManagement 
(I guess the session number will change if there is more than one logged in).

The id of the current desktop is here:

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\SessionInfo\1\VirtualDesktops\CurrentVirtualDesktop

It's not enough to change it to the other virtual desktop key because some UI refresh is needed.

I've checked with procmon, and the dll's that are used in the process are:

  • msctf.dll
  • twinui.dll
  • windows.immersiveshell.serviceprovider.dll
  • shell32.dll
  • UIAnimation.dll

I'll guess that one of them is responsible for the visual refresh, and the main suspect is UIAnimation.dll!

If someone wants to keep investigating, this will serve as a start.

7
  • 7
    After pressing Win + Tab, you can also simply drag the window to the desktop you want.
    – Nearoo
    Sep 13, 2017 at 16:59
  • 8
    @Nearoo which kind of loses the point of doing it fast - mostly without the mouse. Sep 13, 2017 at 20:31
  • 3
    @arieljannai Nah, dragging it is most probably faster than having to right click, open the submenu and clicking on the desktop. A shortcut like on Linux would be best, though. Sep 5, 2018 at 10:30
  • 11
    Just learned something new and useful Shift + F10 = right click
    – JDuarteDJ
    Jun 28, 2019 at 10:47
  • 1
    In 20H2, M for Move is not marked, and pressing the M key in the context menu does nothing. Is there a way to enable that?
    – Jacktose
    May 3, 2021 at 23:04
28

Yet another AHK Script

#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

This moves the active window left or right with the win+arrow keys. Tested on Win10 Version 10.0.17134.1365 with animations off.

10
  • 2
    Works fluently, also with more than two virtual desktops.
    – Matthieu
    May 26, 2020 at 20:35
  • This works well! I copied this to my own script, an added a hotkey to move the current window to a new desktop, by changing the Send line to Send {LWin down}{Ctrl down}d{Ctrl up}{LWin up}
    – husB
    Oct 11, 2020 at 15:30
  • 6
    Note that #Left and #Right conflicts with the shortcuts to snap windows to the side of the screen. Modified it to !#Left and !#Right (Win + Alt + arrow) Oct 27, 2020 at 9:00
  • I'm on Win10Pro and when I ran the script, I got an error "Keyboard/Mouse hook could not be activated". I was able to get it working by changing the hotkeys and removing the navigation Left/Right (e.g. using ^#j works). Any ideas why the navigation keys don't work?
    – artze
    Dec 17, 2020 at 1:51
  • Unfortunately, this does not work with my "VcXsrv X Server" windows. And they are actually the ones I care most about :-( The don't seem to be affected by the WinSet, ExStyle, ^0x80, %Title% commands. Apr 20, 2021 at 13:52
23

UPDATE: It seam to stop working on latest Windows and this project is discontinued by author...

I use Windows 10 Virtual Desktop Enhancer.

Just download it, run it (and configure autostart if you need).

Then you can simply press Win + Ctrl + Shift + Arrow Left / Arrow Right and it will move you app to other desktop and switch to that desktop.

10
  • The script didn't work for me, but the release exe does. Nice solution!
    – lucidbrot
    Jan 14, 2018 at 10:04
  • 3
    simple, transparent, easy to install = perfect!
    – anderstood
    Dec 7, 2018 at 12:26
  • I can't get Win+Ctrl+Shift+Left/Right to work recently. Does this still work for anyone else? Oct 20, 2020 at 16:27
  • 1
    @AndrewRalon Yeah, I also checked and it seams to not work on latest Windows :/ Oct 20, 2020 at 16:47
  • 1
    One can fix the official, but discontinued Windows 10 Virtual Desktop Enhancer by replacing the virtual-desktop-accessor.dll as described in this reddit post. 1. Get the latest official version here. 2. Replace virtual-desktop-accessor.dll in libraries with the one from this fork.
    – ToJo
    Jan 4, 2021 at 10:39
20

At this level of managing Windows, I really think you should use a third-party program to help out. My own solution to this was to add a simple shortcut to AutoHotKey (AHK):

#|::Send, +{F10}M{Enter}

#| is the shortcut, which translates to Win + |

On my keyboard, that makes sense, as | is above Tab, but you could change it to whatever suits your need.

Using above answer by arieljannai, by sending Shift + F10, M, Enter, the marked window will be moved to the other virtual desktop if you're juggling between two.

For an introduction to AHK, please see https://autohotkey.com/docs/Tutorial.htm.

5
  • 2
    F10 does nothing on my computer. The contextual menu key of my (French) keyboard does the job though.
    – Sébastien
    Jan 23, 2017 at 15:45
  • win+Tab, context, V, Enter on Swiss-german setup
    – lucidbrot
    Jan 14, 2018 at 7:59
  • 1
    F10 alone does not bring up context menu, you must hold shift (denoted by + in AHK above). updated answer to reflect the typo.
    – Kevin
    Feb 20, 2019 at 19:55
  • I thought a program called Windows would manage windows just fine? ;)
    – red-o-alf
    Apr 24, 2022 at 7:19
  • This solution requires pressing Win+Tab first. Personally, I wanted to avoid that step (and the time it takes, especially when the CPU is busy which causes a delay).
    – MD004
    Oct 19, 2022 at 17:48
15

I'm not sure why this hasn't been mentioned above, but the following is the native way to do this, without downloading helpers.

  1. Win + Tab to quickly see all applications/windows (if you have multiple monitors, there will be one list on each monitor for each virtual desktop).

  2. Right click on the application/window you want to move over, hover on Move to, and select the desktop you want send the application to.

Before I found this, I even tried the MoveToDesktop project posted above, but I find this just as easy, and the MoveToDesktop menu doesn't seem to appear on all applications anyway (for example, not Chrome nor Sublime at the moment).

8
  • 5
    Too bad that there is still not hotkey for it. Though this works nice too. Jan 19, 2018 at 13:20
  • Once you have the desktops setup its rare that you need to move things over, no?
    – nights
    Jun 7, 2018 at 7:31
  • 4
    I move screens from monitor 1 to 2 all the time with a hotkey. I move between desktops all the time with a hotkey, so why not a hotkey to move a window between virtual desktops? And I mean a native hotkey build in win10 Jun 8, 2018 at 7:19
  • 5
    What has been so nice for many years in Ubuntu Linux has been that you can set up your virtual desktops without ever taking your hands off the keyboard. In the course of working on whatever you're working on, you can decide to launch an app with its hotkey, then decide only afterward that you'd rather put it in a new or other workspace, and send it there with another hotkey. No need to move a hand to mouse or touchpad. It's incredibly fast and efficient. I miss it greatly in Windows. In fact it's one of the reasons I now use Windows only for certain games or Adobe products.
    – cdaddr
    Oct 14, 2018 at 5:29
  • 1
    Thanks a lot!! It answers exactly the original question. Also wondering why so many people using some 3rd party stuff since there's an quick and easy way doing so... and if I need to get some 3rd party tools, install it, then it is not quick.
    – hfrmobile
    Jul 10, 2023 at 11:49
6

zVirtualDesktop

I'm using it for that purpose. It has keyboard shortcuts - which is great.
The developer is very responsive if you report an issue or ask a question or for a possible feature.

The best feature is DesktopView See below.

There are more options at GitHub, which I currently can't remember 😅

Here are some screenshots of zVirtualDesktop

You can choose from these system tray icons enter image description here

It has a really nice feature called DesktopView shown below. With this view you can drag and drop your windows to any desktop. It also works like Alt+Tab in that you can click a thumbnail to go to that window. enter image description here

Note: I answered this question about 1.5-2 years ago, with some hints to start developing something. But now, there are some solutions developed for this.
I added a new answer since there's no point in editing/improving my previous one, since they are totally different.

5
  • There are many programs to do it but the OP is asking about the Virtual Desktop manager included in Windows.
    – skan
    Jan 18, 2018 at 10:56
  • 3
    I haven't used this, but VirtuaWin is worth a try too, since it (1) can auto catch programs into their own desktop, and (2) has addons to improve productivity.
    – Ooker
    May 31, 2018 at 8:38
  • 3
    I checked out zVirtualDesktop and it doesnt look trustworthy. Hosts on a Github but is closed source (apparently the source got removed), the older version that was apparently accidentally uploaded to Github (the exe is in the history) has a different usage license (private use is free forever) but autoupdates to the everyone-pays version... Also no mention of price on the site, only when you already launched it
    – sinni800
    Sep 14, 2018 at 6:26
  • VirtuaWin is fantastic. It does not manipulate windows 10 Virtual Desktop but it seems to hide/restore windows. I've been using it since XP, perfect for windows <10. In Win10 it has minor glitch but still very useful. Win10 native virtual desktop is clunky and incomplete in comparison.
    – AnyDev
    Nov 30, 2021 at 5:34
  • why using some 3rd party stuff from a not trusted source when there's a built-in way doing so...
    – hfrmobile
    Jul 10, 2023 at 11:50
5

Taking hints from the solutions of Greenonline and Sebastien:

  1. Hit 'Win+Tab' for the Workspace Management View
  2. Directional keys to navigate to the window of interest (if this was the last one in focus, it shouldn't be necessary).
  3. Hit the 'Context' key for a dropdown menu (typically the key with the Windows logo between 'Ctrl' and 'Alt'), where you can select moving to other desktops.

So, not very straightforward, but definitely something you can easily automate your hands to do.

1
  • 1
    Completely agree. Not ideal, but I'd rather automate my hands to follow these simple steps than to install some third party, specially when they seem to be having modest maintenance. May 14, 2020 at 12:01
4

I use autohotkey with the keyboard shortcut CTRL+WIN+SHIFT+LEFT or RIGHT to push windows to the other virtual desktop. I only use 2 virtual desktops, so this works for me regardless if i press left or right.

AHK Code:

#^+Left::
#^+Right::
Send #{tab}        ;WIN+TAB=Open the desktop view
Sleep 200
Send +{F10}M{Enter};SHIFT+F10=context menue. M=move. Enter for the first desktop in the list.
Sleep 100
Send #{tab}        ;WIN+TAB=Close the desktop view
return
1
  • Note that this only works (in a multi-monitor setup) for applications on the main monitor. I needed to add a "Send {Left}{Right}" after the "Send #{tab}" to ensure that the application is actually selected before trying to move, or this did nothing. Apr 13, 2018 at 23:27
4

Given that Eun's MoveToDesktop is now unmaintained and no longer works, an alternative I've found for AutoHotKey is VD.ahk. It works on current versions of Windows 10 and 11.

Download the AHK files (as of this writing, the default branch shows files for AHK 1.x; support for AHK 2 can be found on an alternate branch) and add to your ahk script:

#Include VD.ahk
#!Left::VD.MoveWindowToRelativeDesktopNum("A", -1)
#!Right::VD.MoveWindowToRelativeDesktopNum("A", 1)

This binds to Win+Alt+Left/Right.

1
  • Worked well for me. I had to download SetForeGroundWindow.exe as well Jul 6, 2023 at 15:31
3

As of Windows 10 Version 1803, the simple way to move current/targeted window from 1 desktop to another is by following way:

  1. Press Win + Tab to see the timeline.
  2. Below Desktops section, you'll see the list of active running programs window under the current desktop. Click & hold the window and drag into specific desktop you want.
  3. Voila!


Plus, its native and doesn't require any third party software.

1
  • And it means taking your hands off the keyboard – which is what the posts/comments above are trying to avoid. Nov 30, 2023 at 4:29
2

It ain't pretty but it doesn't use the mouse or any third-party software

Win + Tab, Shift + F10, Arrow Down, Arrow Down, Enter, Arrow Down, Enter, Esc

1

For me Shift + F10 doesn't work.

But this key is doing his job:

enter image description here

So I am able to move windows across desktop only with the keyboard navigating in the right click menu in the desktop preview view.

0

Autohotkey solution. Bound to Win+Tilde key. This script automates all keystrokes that you would perform manually to send it to the next (if you're on the first) or previous desktop. Be careful though with such things - this can be dangerous if this input goes to wrong destination.

SendMode Input 
#`::
    send {blind}#{tab}
    sleep 1000
    send {appskey}
    sleep 300
    send {down}
    sleep 200
    send {down }
    sleep 200
    send {right}
    sleep 200
    send {left}
    sleep 200
    send {right}
    sleep 300
    send {enter}
    sleep 300
    send {esc}
    sleep 300
return
-4

simple press Winkey + Tab, now select the program (window) and drag it to the list of Desktops shown below (Desktop 1 or 2). Done. No other way..

3
  • 6
    "No other way" Clearly false as one of the other answer shows.
    – DavidPostill
    Jan 28, 2017 at 15:14
  • this is the best answer despite the negative votes
    – jmhostalet
    Mar 13, 2018 at 10:01
  • On one hand, since Microsoft keeps changing things to keep them interesting, none of the other answers here were working anymore at the time this was written, so what the author is trying to hint at with "No other way" is technically true. On the other hand, the author should learn to express themselves better than that. (Also, there is no such thing as a "simple press". The author should learn how to use punctuation.)
    – Mike Nakis
    Oct 10, 2023 at 10:20
-8

Win + Shift + Arrow Left / Arrow Right

or

Win + Arrow Left / Arrow Right

or

Win + Arrow Up / Arrow Down

2
  • 2
    Those shortcuts do not move between virtual desktops. Mar 25, 2017 at 23:50
  • 5
    It seems to move between multiple displays
    – jlanza
    Aug 16, 2017 at 16:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .