From ecbfc28df79d3a86fe6d1b8434c30074553902e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 24 Aug 2021 23:26:46 +0200 Subject: programs: Add SimCity 4 hotkeys --- tt.programs.ahk | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- cgit v1.2.3