WindowsVirtualDesktopHelper icon indicating copy to clipboard operation
WindowsVirtualDesktopHelper copied to clipboard

[Feature Request]: support win+#

Open kola-web opened this issue 3 months ago • 7 comments

What feature?

suport win+#

Windows Version

windows11

kola-web avatar Sep 05 '25 02:09 kola-web

This configuration does not take effect

hotkeys.myCustomHotkey1 = "Win + D1 = Desktop1" hotkeys.myCustomHotkey2 = "Win + D1 = Desktop2" hotkeys.myCustomHotkey3 = "Win + D1 = Desktop3" hotkeys.myCustomHotkey4 = "Win + D1 = Desktop4" hotkeys.myCustomHotkey5 = "Win + D1 = Desktop5" hotkeys.myCustomHotkey6 = "Win + D1 = Desktop6" hotkeys.myCustomHotkey7 = "Win + D1 = Desktop7" hotkeys.myCustomHotkey8 = "Win + D1 = Desktop8" hotkeys.myCustomHotkey9 = "Win + D1 = Desktop9"

kola-web avatar Sep 05 '25 03:09 kola-web

Ok! More correctly, app unhappy when I ask it to use hotkeys- ctrl+#. Report says:

Couldn’t register the hot key. at WindowsVirtualDesktopHelper.WindowsHotKeyAPI.KeyboardHook.RegisterHotKey(ModifierKeys modifier, Keys key) at WindowsVirtualDesktopHelper.App.SetupHotKeys() at WindowsVirtualDesktopHelper.Program.Main(String[] args)

Windows Build: 26100.4652 Windows Version: 24H2 Windows Virtual Desktop Helper Version: 2.0.0.0 Virtual Desktop Implementation: VirtualDesktopWin11_Insider25314

Log: Using config file(s): C:\Users\johnx\AppData\Roaming\WindowsVirtualDesktopHelper\WindowsVirtualDesktopHelper.exe.config Config: feature.showDesktopNameInIconTray: true feature.useHotKeyToJumpToDesktopNumber: true

Looking forward to solution, as I switch desktops often (two of)!

johnphelan1-sudo avatar Sep 09 '25 15:09 johnphelan1-sudo

I'm not sure trying to bind win+# is proper as that is already bound to the app in that position on the taskbar.

Would need to be combined with a modifier if possible unless override is what you're looking for.

As I use the win+# combination already that would not be optimal for me.

carlanwray avatar Sep 18 '25 15:09 carlanwray

This is an integrated habit on linux, and habits are not easy to change

kola-web avatar Sep 19 '25 01:09 kola-web

You can do so by using AutoHotKey I chose the Ctrl + Alt + # shortcut and remapped it to Win + #

here is the AutoHotKey v2 script

; Remap Win + (1...9) to Ctrl + Alt + (1...9) 
; for github.com/dankrusi/WindowsVirtualDesktopHelper
; to change desktops instead of changing/opening taskbar programs/apps

Loop 9 {
    n := A_Index
    fDown := KeyDown.Bind(n)
    fUp   := KeyUp.Bind(n)
    Hotkey("#" . n, fDown)
    Hotkey("#" . n . " Up", fUp)
}

KeyDown(n, *) {
    Send("{Ctrl down}")
    Send("{Alt down}")
    Send("{" n " down}")
}

KeyUp(n, *) {
    Send("{Ctrl up}")
    Send("{Alt up}")
    Send("{" n " up}")
}

phrechu avatar Sep 19 '25 02:09 phrechu

Thank you for your solution. In fact, I have an autohotkey solution in my dotfiles. I was just about to ask if the current software supports win+#

You can do so by using AutoHotKey I chose the Ctrl + Alt + # shortcut and remapped it to Win + #

here is the AutoHotKey v2 script

; Remap Win + (1...9) to Ctrl + Alt + (1...9) 
; for github.com/dankrusi/WindowsVirtualDesktopHelper
; to change desktops instead of changing/opening taskbar programs/apps

Loop 9 {
    n := A_Index
    fDown := KeyDown.Bind(n)
    fUp   := KeyUp.Bind(n)
    Hotkey("#" . n, fDown)
    Hotkey("#" . n . " Up", fUp)
}

KeyDown(n, *) {
    Send("{Ctrl down}")
    Send("{Alt down}")
    Send("{" n " down}")
}

KeyUp(n, *) {
    Send("{Ctrl up}")
    Send("{Alt up}")
    Send("{" n " up}")
}

kola-web avatar Sep 19 '25 03:09 kola-web

ah I see, I tried setting up the win+# in the config file by following the docs, even though the win key is an actual modifier it didn't work for me. I get this error Couldn’t register the hot key. so unless I'm missing something, I guess it's not supported

phrechu avatar Sep 20 '25 12:09 phrechu