Skip to content

Instantly share code, notes, and snippets.

@don-smith
Created October 21, 2019 21:03
Show Gist options
  • Save don-smith/407a9aa3ba277e0d7c9821137958c83b to your computer and use it in GitHub Desktop.
Save don-smith/407a9aa3ba277e0d7c9821137958c83b to your computer and use it in GitHub Desktop.
A PowerShell script to enable X-inspired mouse behavior
# Found at https://superuser.com/a/1209478
$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