Script to fast switch virtual desktop

naodczpe

New Member
Apr 28, 2018
1
1
Simple AutoHotkey script to quickly switch to the second virtual desktop. It also mutes the volume. This is useful when you work on or use something NSFW.

To use this, open the Task View (you can do this by pressing WinKey + TAB or using the icon). Then, add a second virtual desktop (Windows will remember this after restarting). Run the script from a file (as an executable) or install AutoHotkey and run the script file.
Now you can instantly switch between virtual desktops with the CAPSLOCK key.

Script code:
Code:
;Switch to right virtual desktop
CapsLock::
if (check)
{
check:=false
Send, {LControl down}#{Left}{LControl up}
;Send {Volume_Mute}
SoundSet, +1, , mute
return
}
else
{
check:=true
Send, {LControl down}#{Right}{LControl up}
;Send {Volume_Mute}
SoundSet, +1, , mute
return
}
 
  • Like
Reactions: NadaMucho