MScholtes / PSVirtualDesktop

VirtualDesktop is a Powershell module that provides commandlets to manage virtual desktops of Windows 10.
MIT License
304 stars 18 forks source link

How hard would it be to add shortcuts? #26

Closed shellwhale closed 1 year ago

shellwhale commented 1 year ago

I'd like to be able to switch desktops by using shortcuts. By default, we can use CTRL + WINDOWS + Right/Left in order to switch between desktops but I'd like to also be able to use numbers.

CTRL + WINDOWS + would go to desktop

Any idea on how I could implement this? Would it be fast to run your PowerShell commands after pressing a key?

MScholtes commented 1 year ago

Hello @shellwhale,

I would advice you to use a shortcut tool like Autohotkey to set the key combination. Using PSVirtualDesktop to switch the desktops would be too slow since it's a Powershell script. You might use the companion tool VirtualDesktop (https://github.com/MScholtes/VirtualDesktop) instead.

Or the best would be using something like the answer solution here: https://superuser.com/questions/1685845/moving-current-window-to-another-desktop-in-windows-11-using-shortcut-keys

Greetings

Markus

shellwhale commented 1 year ago

I managed to simply run .bat files that call VirtualDesktop.exe using Corsair's Icue, as I explained here 😀

Worked perfectly on my old system but not on my new system, can't figure out why! Otherwise, your tool is really great, and perfect for my use case.

MScholtes commented 1 year ago

Workaround exists