-
-
Save j67678/b31d7eed31dc5879075dba4c99e655d2 to your computer and use it in GitHub Desktop.
Add a hot-corner to switch desktop in windows 10
This file contains hidden or 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
; download & install: https://autohotkey.com/ | |
; save this script with the extension ".ahk" | |
; click on the script to start it and/or set it to launch automatically. | |
#Persistent | |
SetTimer, HotCorners, 0 | |
return | |
HotCorners: | |
CoordMode, Mouse, Screen | |
; get desktop size | |
WinGetPos, X, Y, Xmax, Ymax, Program Manager | |
; adjust tolerance value if desired | |
T = 2 | |
MouseGetPos, MouseX, MouseY | |
; any of these can be used to have a different hot corner | |
Corner := (MouseY < T and MouseX < T) ; top left | |
;Corner := (MouseY < T and MouseX > Xmax - T) ; top right | |
;Corner := (MouseY > Ymax - T and MouseX < T) ; bottom left | |
;Corner := (MouseY > Ymax - T and MouseX > Xmax - T) ; bottom right | |
; top-left hot-corner-hit => send super + tab | |
if Corner { | |
; ^ = Control and # = Windows Key | |
Send, ^#{Left} | |
; prevent retriggering | |
Sleep, 500 | |
} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment