diff options
author | John Ankarström <john@ankarstrom.se> | 2021-08-24 23:26:46 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-08-24 23:26:46 +0200 |
commit | ecbfc28df79d3a86fe6d1b8434c30074553902e6 (patch) | |
tree | a2a2333c2775d1435f75126d4fa718c6f675ee38 | |
parent | e00a385221a5ffbb4fbcbcd92f3a2bc38e445f5d (diff) | |
download | ahk-ecbfc28df79d3a86fe6d1b8434c30074553902e6.tar.gz |
programs: Add SimCity 4 hotkeys
-rw-r--r-- | tt.programs.ahk | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tt.programs.ahk b/tt.programs.ahk index 9d9578d..6027f82 100644 --- a/tt.programs.ahk +++ b/tt.programs.ahk @@ -149,4 +149,15 @@ SendInput, {LAlt Up} AltTabActive := 0 return +#If WinActive("ahk_exe SimCity 4.exe") + +; Fix pausing for non-English keyboard layouts +^SC029:: +old := Layout() +us := DllCall("LoadKeyboardLayout", "Str", "00000409", "Int", 1) +DllCall("SendMessage", "UInt", WinActive("A"), "UInt", 80, "UInt", 1, "UInt", us) +SendInput, {LCtrl Down}``{LCtrl Up} +DllCall("SendMessage", "UInt", WinActive("A"), "UInt", 80, "UInt", 1, "UInt", old) +return + #IfWinActive |