WindowsVirtualDesktopHelper icon indicating copy to clipboard operation
WindowsVirtualDesktopHelper copied to clipboard

Question / Feature Request - Can we use a hotkey to move the current window to another virtual desktop

Open JPStrydom opened this issue 2 years ago • 15 comments

This tool looks amazing! Thanks for making it.

I previously used MoveToDesktop and then VD to move the currently focused window to another virtual desktop with a hotkey, but it seems like these libraries don't work anymore due to Windows updates.

Would it be possible to add such functionality to this project, or is it perhaps already supported?

What I had in mind is to use a set of hotkeys to move the currently focused window. For example, Ctrl + Shift + Win + ← moves the currently focused window to the left virtual desktop and switches to that virtual desktop - similarly Ctrl + Shift + Win + → moves the currently focused window to the right virtual desktop.

Hope this gets some traction 👍

JPStrydom avatar Sep 19 '23 08:09 JPStrydom

@JPStrydom @dankrusi

Hi, yes i second this, it would be a wonderful feature.

Example to move a focused window to another virtual desktop:

Switch focused window to virtual workspace 2 - Alt+shift 2 Switch focused window to virtual workspace 3 - Alt+shift 3 Switch focused window to virtual workspace 4 - Alt+shift 4

Best regards CC

ComputerCulture avatar Oct 15 '23 01:10 ComputerCulture

Hi @JPStrydom @ComputerCulture , if you can point me to some Windows documentation for these features or some open source project links on github that have such similar features, I might consider it. Many of the virtual desktop features are undocumented by Microsoft, and at the moment its enough of a task to keep up with them changing the secret APIs constantly... Not sure if maintaining such extra features is the best idea. But I will look into it if you point me in the right direction. Best, -dan

dankrusi avatar Oct 16 '23 05:10 dankrusi

Hi, @dankrusi

  1. Thank you for your reply. There are few programs that move the current window to another virtual desktop. Most of the programs i know of, also include window tiling, so ill keep looking for other examples that might give an idea how to implement this in your software.

I have found one old example, thought not perfect it still works.

https://github.com/Eun/MoveToDesktop

Maybe you can improve on this?

  1. Dan would it also be possible to implement this idea below.

Using keybindings to switch to new virtual desktops. This would be really quick way to move around virtual desktops.

Example, Switch to virtual workspace 1 - Alt 1 Switch to virtual workspace 2 - Alt 2 Switch to virtual workspace 3 - Alt 3 Switch to virtual workspace 4 - Alt 4

Thank you Dan

Best regards CC

ComputerCulture avatar Oct 20 '23 04:10 ComputerCulture

See v1.15

dankrusi avatar Oct 20 '23 08:10 dankrusi

I will add a comment to this. The feature I'm looking for is in the same area. I'd like a hotkey for switching to next/previous desktop. E.g. using ALT+Q and ALT+W

This feature is found in the VirtuaWin below, which I am using now. https://virtuawin.sourceforge.io/ https://sourceforge.net/p/virtuawin/src/ci/master/tree/

Thanks.

Pasgaard avatar Oct 28 '23 10:10 Pasgaard

Hi @Pasgaard

Just interested to know are you asking about hotkeys to just switch to another virtual desktop, or hotkeys which sends the active window to another selected virtual desktop

Thanks...

ComputerCulture avatar Oct 28 '23 10:10 ComputerCulture

Hi @Pasgaard

Just interested to know are you asking about hotkeys to just switch to another virtual desktop, or hotkeys which sends the active window to another selected virtual desktop

Thanks...

That was a fast response! For now I only need to set new hotkeys for a switch beteeen desktops. We cannot modify the existing ones using a combination of keys placed in each end of the keyboard.

Pasgaard avatar Oct 28 '23 10:10 Pasgaard

Does anyone else want the possibility to set a custom hotkey for switching vdesktop forwards/backwards?

For example the settings could be: Ctrl+Left/Right, Ctrl+Alt+Left/Right, Alt+Q/W, Ctrl+Alt+Q/W

dankrusi avatar Oct 28 '23 12:10 dankrusi

Hi @dankrusi

I have found software which sends the active window to another selected virtual desktop. Maybe this enhancement can be can be added at some stage.

The project seems to have stopped many years ago.

https://github.com/octalmage/mDesktop

Thank you Dan

Regards CC

ComputerCulture avatar Oct 28 '23 23:10 ComputerCulture

Moving window from one desktop to another via hotkeys is explained here: https://superuser.com/questions/1685845/moving-current-window-to-another-desktop-in-windows-11-using-shortcut-keys. I'd love to have the option inside the Windows Virtual Desktop Helper, but if I could choose I would prefere the context-menu option that https://github.com/Eun/MoveToDesktop has to offer.

matzter avatar Jan 09 '24 09:01 matzter

Hi @matzter The only problem that i can see using the context-menu option type that (MoveToDesktop) Seems Web Browsers don't have that kind menu option that i can see.

ComputerCulture avatar Jan 10 '24 03:01 ComputerCulture

Would also like to see this feature (sending active window to another vd) implemented.

https://github.com/hwtnb/SylphyHornPlusWin11 this project has an implementation of this functionality

Sadly, the project itself is in kinda stale state for the past 3-4 months therefore I'm looking for an alternative and found that your app is pretty simple yet powerful, just need a couple of extras so I can stick to the workflow that I'm used too.

Great work btw!

padd1er avatar Jan 30 '24 08:01 padd1er

+1 for moving the current active window to another desktop. I have googled and there is a AutoHotKey suggestion https://superuser.com/questions/1685845/moving-current-window-to-another-desktop-in-windows-11-using-shortcut-keys

jasonjac2 avatar Aug 17 '24 11:08 jasonjac2

https://github.com/hwtnb/VirtualDesktop/blob/102f693f3a076189ca8c25f33cd9918c96365af5/source/VirtualDesktop/Interop/IVirtualDesktopManager.cs

namespace WindowsDesktop.Interop { [ComImport] [Guid("a5cd92ff-29be-454c-8d04-d82879fb3f1b")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IVirtualDesktopManager { bool IsWindowOnCurrentVirtualDesktop(IntPtr topLevelWindow);

	Guid GetWindowDesktopId(IntPtr topLevelWindow);

	void MoveWindowToDesktop(IntPtr topLevelWindow, ref Guid desktopId);
}

// see also: 
//  "C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\um\ShObjIdl.h"
//  https://msdn.microsoft.com/en-us/library/windows/desktop/mt186440%28v=vs.85%29.aspx
//  http://www.cyberforum.ru/blogs/105416/blog3671.html

}

dankrusi avatar Oct 25 '24 18:10 dankrusi

Hi! Do keyboard shortcuts work for move applications to another virtual desktop? How do I setup it?

zamboga avatar Jun 06 '25 08:06 zamboga