 }
 
 HideOverlay() {
+    global overlayVisible
+    overlayVisible := 0
     SplashImage, Off
 }
 
-ShouldHideOverlay() {
-	if(GetKeyState("Ctrl", "P") = 0 && GetKeyState("LWin", "P") = 0) {
-	    return 1
-	} else {
-	    return 0
-	}
-}
-
-CheckHideOverlay() {
-    if(ShouldHideOverlay() = 1) {
-	    HideOverlay()
-	}
 ToggleAlwaysOnTop(hwnd := "") {
     if(hwnd == "") {
         hwnd := WinExist("A")

}

ShowOverlay(title, message) {
    SysGet, primary, MonitorPrimary
    SysGet, monitor, Monitor, %primary%
	width := 200

    MouseGetPos,,,id
    MsgBox, %id%
return
#If overlayVisible
; When either Ctrl or Win is released, the overlay is hidden.
~*Ctrl Up::HideOverlay()
~*LWin Up::HideOverlay()
#If
