Skip to content

Instantly share code, notes, and snippets.

@x1unix
Created April 25, 2024 02:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save x1unix/2e967c15b793a727f77e6f6f4cbb7d6a to your computer and use it in GitHub Desktop.
Save x1unix/2e967c15b793a727f77e6f6f4cbb7d6a to your computer and use it in GitHub Desktop.
Windows - Focus Follows Mouse
$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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment