Created
November 27, 2023 12:10
-
-
Save grandsilence/fb8bcf8ea1acb2133537ce724e9c83ba to your computer and use it in GitHub Desktop.
Windows AutoHotKey script switch virtual desktops by mouse scroll on taskbar or by Alt+Right / Alt+Left
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#If MouseIsInvolumecontrolarea() and not WinActive("ahk_class TscShellContainerClass") | |
WheelUp::Send {LControl down}#{Right}{LControl up} | |
WheelDown::Send {LControl down}#{Left}{LControl up} | |
#If | |
MouseIsInvolumecontrolarea() | |
{ | |
CoordMode, Mouse, Screen | |
MouseGetPos, xpos, ypos | |
if (ypos > A_ScreenHeight-60 and xpos <= A_ScreenWidth-500) | |
Return 1 | |
else | |
Return 0 | |
} | |
;Switch to right virtual desktop | |
!Right:: | |
Send, {LControl down}#{Right}{LControl up} | |
return | |
;Switch to left virtual desktop | |
!Left:: | |
Send, {LControl down}#{Left}{LControl up} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment