Last active
January 25, 2019 09:36
-
-
Save fritschy/5439abe2c2d85347503211848baa2d0f to your computer and use it in GitHub Desktop.
Focus Follows Mouse for Windows 10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# According to: https://superuser.com/a/1209478/60220 | |
$sinature = @" | |
[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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ctypes import * | |
SPI_SETACTIVEWINDOWTRACKING = c_uint(0x1001) | |
dll = WinDLL('user32') | |
if dll.SystemParametersInfoA(SPI_SETACTIVEWINDOWTRACKING,c_uint(0),pointer(c_uint(1)),c_uint(2)): | |
print("Enabled focus-follows-mouse") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment