Open theartkod opened 1 year ago
Yes, this is the default implementation, as it works the most robustly across systems and is least likely to break long-term.
If I remember correctly, the other solution is to use the DLL (VirtualDesktopAccessor.dll) as it contains API to "jump" straight into the target desktop.
Ideally, we could select which implementation to use in a config - if anyone wanted to develop this, I'd be happy to review it and merge it
@Elijas Hi! Thanks for quick answer!
Can you suggest, please, how I can change to this dll just for myself?
Yup!
At the top of the desktop_switcher.ahk
file:
GoToDesktopNumberProc := DllCall("GetProcAddress", Ptr, hVirtualDesktopAccessor, AStr, "GoToDesktopNumber", "Ptr")
In _switchDesktopToTarget
function of the desktop_switcher.ahk
file
DllCall(GoToDesktopNumberProc, Int, num)
There are other DllCall
examples in both, the desktop_switcher.ahk
file, and in the https://github.com/Ciantic/VirtualDesktopAccessor repo.
Let me know if you have any questions, and If you succeed I'd highly encourage you to release a pull request, just as a helpful example for others who would want to change to the DLL solution as well.
When going from 1 desktop to 5 via shortcut, instead of toggling straight from 1 to 5, looks like appear cycling every desktop until we reach 5 (target desktop).
System: Windows 11 21H2
https://user-images.githubusercontent.com/26459115/192045009-bf3c3132-e728-479a-89b9-529293c60bbb.mp4