300

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?

Lloyd Dominic
  • 213
  • 1
  • 3
  • 16
Borek Bernard
  • 15,019

17 Answers17

193

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.

Eun
  • 2,553
119

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.

fixer1234
  • 28,064
arieljannai
  • 3,569
  • 5
  • 24
  • 37
32

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.

Benjamin
  • 429
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.

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.

Jacktose
  • 277
vildauget
  • 309
19

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).

Lloyd Dominic
  • 213
  • 1
  • 3
  • 16
nights
  • 311
8

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.

arieljannai
  • 3,569
  • 5
  • 24
  • 37
6

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.

6

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.

josh3736
  • 4,203
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
3

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

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

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.

Zioalex
  • 121
0

You can set an application to show on all desktops, and it is built into Windows 10/11.

Steps:

  • Press Win + Tab.
  • Right-click on the application you're targeting. There are two options:
    • "Show this window on all desktops"
    • "Show windows from this app on all desktops".

The first option is great for apps like Winamp and Spotify. The second option is great for apps like Outlook that can have child windows.

Windows 10 screenshot showing desktop switch screen, with right click menu options visible after right clicking on Winamp


This is somewhat related to the original post. And I finally figured it out after visiting this page. (I didn't even realize you could right click the apps in the Win+Tab screen.)

kodybrown
  • 297
-1

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
Mikhail V
  • 1,041
-6

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..

vignesh
  • 15
-10

Win + Shift + Arrow Left / Arrow Right

or

Win + Arrow Left / Arrow Right

or

Win + Arrow Up / Arrow Down