>>55
Win32のGetKeyState関数は静的状態を取得するものなので、
変化を検知して出力する方がよいです。
Notepad.exe を非アクティブウインドウとして、
サクラエディタをアクティブウインドウとしたとき、"j"キーを両方に出力するサンプルです。

#InstallKeybdHook
#UseHook

SetKeyDelay,10,100
Loop
{
Sleep,16
stCurr2 := DllCall("GetKeyState", "UInt", 74) & 128 ; VK_J
If(stCurr2=128 && stLast2= 0)
{
ControlSend, , {j down}, ahk_class Notepad
} else If(stCurr2=0 && stLast2= 128)
{
ControlSend, , {j up}, ahk_class Notepad
}
stLast2 := stCurr2
}

現状、このソフトウェアを持っていないので再現できないのですが、
非アクティブウインドウに Alt-JをControlsend できるならば、
寧ろ、Alt + j をホットキー登録して、Autohotkeyにキーを喰わせたのち、
アクティブウインドウと非アクティブウインドウに Alt-J を Controlsend してはどうでしょうか。

その場合、ループ処理と、GetKeyState関数は不要となります。