-﻿#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
+﻿#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
 ; #Warn  ; Enable warnings to assist with detecting common errors.
-SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
-SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
+SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
+SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
+
+SetKeyDelay , 30, 30 ; first is delay between keypresses, and second is press duration
 
 #WinActivateForce
 DetectHiddenWindows, On
 
-SetKeyDelay , 30, 30 ; first is delay between keypresses, and second is press duration
+#MaxHotkeysPerInterval 200
 
 Ctrl UP::Send {Escape}
 Ctrl & F13::
 
 ^Tab::
-    Send #{Tab}
-return
-
-^`::
-    IfWinActive, ahk_exe WindowsTerminal.exe
-        Send !{Tab}
-    else
-        WinActivate ahk_exe WindowsTerminal.exe
-return
-
-^!t::
-    IfWinActive, ahk_exe alacritty.exe
-        Send !{Tab}
-    else
-        WinActivate ahk_exe alacritty.exe
-return
-
-^!g::
-    IfWinActive, ahk_exe msedge.exe
-        Send !{Tab}
-    else
-        WinActivate ahk_exe msedge.exe
-return
-
-^!m::
-    IfWinActive, ahk_exe chrome.exe
-        Send !{Tab}
-    else
-        WinActivate ahk_exe chrome.exe
-return
-
-^!r::
-    IfWinActive, ahk_exe firefox.exe
-        Send !{Tab}
-    else
-        WinActivate ahk_exe firefox.exe
-return
-
-^!w::
-    IfWinActive, ahk_exe iridium.exe
-        Send !{Tab}
-    else
-        WinActivate ahk_exe iridium.exe
-return
-
-^!u::
-    IfWinActive, ahk_exe Unity.exe
-        Send !{Tab}
-    else
-        WinActivate ahk_exe Unity.exe
-return
-
-^!a::
-    IfWinActive, ahk_exe VsCodium.exe
-        Send !{Tab}
-    else
-        WinActivate ahk_exe VsCodium.exe
-return
-
-^!v::
-    IfWinActive, ahk_exe devenv.exe
-        Send !{Tab}
-    else
-        WinActivate ahk_exe devenv.exe
-return
-
-^!x::
-    IfWinActive, ahk_exe devenv.exe
-        Send !{Tab}
-    else
-        WinActivate ahk_exe devenv.exe
-return
-
-^!s::
-    IfWinActive, ahk_exe ApplicationFrameHost.exe
-        Send !{Tab}
-    else
-        WinActivate ahk_exe ApplicationFrameHost.exe
-return
-
-^!i::
-    IfWinActive, ahk_exe idea.exe
-        Send !{Tab}
-    else
-        WinActivate ahk_exe idea.exe
-return
-
-^!h::
-    IfWinActive, ahk_exe zeal.exe
-        Send !{Tab}
-    else
-        WinActivate ahk_exe zeal.exe
+Send #{Tab}
 return
 
 ^!o::
 IfWinActive, ahk_exe Obsidian.exe
-    Send !{Tab}
+    sleep, 10
 else
     WinActivate ahk_exe Obsidian.exe
 return
 
-^!n::
-    IfWinActive, ahk_exe MindMaster.exe
-        Send !{Tab}
-    else
-        WinActivate ahk_exe MindMaster.exe
+^!g::
+IfWinActive, ahk_exe msedge.exe
+    sleep, 10
+else
+    WinShow ahk_exe msedge.exe
+    WinActivate ahk_exe msedge.exe
+    MouseClick
 return
 
-^!d::
-    IfWinActive, ahk_exe code.exe
-        Send !{Tab}
-    else
-        WinActivate ahk_exe code.exe
+^!m::
+IfWinActive, ahk_exe chrome.exe
+    sleep, 10
+else
+    WinShow ahk_exe chrome.exe
+    WinActivate ahk_exe chrome.exe
+    MouseClick
+return
+
+^`::
+IfWinActive, ahk_exe WindowsTerminal.exe
+    sleep, 10
+else
+    WinActivate ahk_exe WindowsTerminal.exe
+    MouseClick
 return
 
 ^!Space::

{
  VarSetCapacity(out,2*StrPut(str_,"utf-16"))
  StrPut(str_,&out,"utf-16")
}
        KeyboardLED(4, "on")
    Else
        KeyboardLED(4, "off")
return

^CapsLock::
    ChineseLayout := 0
    KeyboardLED(4, "off")
return

/*
