Skip to content

Instantly share code, notes, and snippets.

@mal1kc
Last active October 4, 2023 18:25
Show Gist options
  • Save mal1kc/8a88be2bde411c80bab2d84b8e3619d8 to your computer and use it in GitHub Desktop.
Save mal1kc/8a88be2bde411c80bab2d84b8e3619d8 to your computer and use it in GitHub Desktop.
focus follows mouse in win10,11
# this is a powershell script to uset it download as raw and execute with pwsh (powershell)
# i found from internet
# - link https://superuser.com/a/1209478
# not tested in win11 but i think it will work fine
# ----
$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