Key bindings lost after language switching ** FIX ** (kind of)

This is a known issue on Windows when closing Renoise while switched to any other language than English.
The solution was to create an AutoHotKey v1.0 to keep system language from switching while Renoise is in focus.
The script is intended for Windows systems with English and Greek languages installed. For other languages, you’ll have to edit manually or using Claude AI (the script was made using it).

Copy and paste the following code into a notepad, save as .ahk and run it in the background.

*AutoHotKey v1 must be installed in your system.

https://www.autohotkey.com/

#NoEnv
#Persistent
#SingleInstance Force
SetBatchLines, -1

; ============================================================
;  Block Greek keyboard layout while Renoise is focused
;  AutoHotkey v1  -  polling version
; ============================================================

global ENGLISH_LANGID := 0x0409
global GREEK_LANGID   := 0x0408

; Fallback English HKL; replaced with the real one at runtime
global EngHKL := 0x04090409

SetTimer, CheckLayout, 75
return

CheckLayout:
    hwnd := WinActive("A")
    if !hwnd
        return

    thread := DllCall("GetWindowThreadProcessId", "Ptr", hwnd, "Ptr", 0)
    hkl    := DllCall("GetKeyboardLayout", "UInt", thread, "Ptr")
    langid := hkl & 0xFFFF

    ; Remember the real English HKL whenever we see it active anywhere
    if (langid = ENGLISH_LANGID)
        EngHKL := hkl

    WinGet, procName, ProcessName, A
    if (InStr(procName, "Renoise") && langid = GREEK_LANGID) {
        ; WM_INPUTLANGCHANGEREQUEST = 0x50, lParam = target HKL
        PostMessage, 0x50, 0, EngHKL, , ahk_id %hwnd%
    }
return