I need to achieve focus follows mouse but keyboard focus doesn't follow mouse. So the focus is active where my mouse is staying, but the keyboard is safely typing in the other window without changing focus from the window where the mouse is pointing.
I tried this powershell script from here link:
$signature = @"
[DllImport("user32.dll")]
public static extern bool SystemParametersInfo(int uAction, int uParam, ref
int lpvParam, int flags );
"@
$systemParamInfo = Add-Type -memberDefinition $signature -Name SloppyFocusMouse -passThru
[Int32]$newVal = 1
$systemParamInfo::SystemParametersInfo(0x1001, 0, [REF]$newVal, 2)
but it only make the mouse active on the first application but as soon as I type with keyboard on the other application it loses focus.