Autohotkey + custom Latin layout + non-Latin layout

0

1

Problem in which neither VK virtual keys nor ScanCodes don't help.
Custom Latin layout is default input system.

When switching from custom Latin layout to non-Latin layout, in non-Latin mode Autohotkey 'thinks' it's now working with US international layout, not with custom Latin layout. So the keys become mixed up, they are now in other places on the keyboard. The keys still work, but they are now on other buttons of the keyboard...

Is there a simple way to solve this problem, like changing some registry key for the Autohotkey program, so that it could continue to use custom Latin layout no matter what layout is on?

What Windows dlls does Autohotkey use?

I hate StackExchange

Posted 2016-05-28T17:01:02.070

Reputation: 1

Answers

0

You could try to simply setup two different Hotkeys and Hotstrings sets, one for each layout and use #If to make one set the active one, an example copied from the AutoHotkey forum below.

; question: http://autohotkey.com/board/topic/150272-allow-script-to-run-only-with-one-keyboard/
; code from: http://forum.script-coding.com/viewtopic.php?id=7396
#If (GetKeyboardLayout("A") = 4105) ; 4105 = 0x1009 https://msdn.microsoft.com/en-us/library/aa912040
; your hotkeys here
#If

GetKeyboardLayout(ByRef window)
{
    return DllCall("GetKeyboardLayout", "UInt", DllCall("GetWindowThreadProcessId", "Int", WinExist(window), "Int", 0), "UShort")
}

lintalist

Posted 2016-05-28T17:01:02.070

Reputation: 258