Last active
November 17, 2024 19:50
-
-
Save josy1024/f2cca5e49ec60ae7ed3c514bb2159051 to your computer and use it in GitHub Desktop.
natural maus scrolling (flipflop mouse wheel scrolling)
This file contains 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
# author: josef lahmer | |
# http://josy1024.blogspot.co.at/2013/11/touch-scrolling-for-windows-reverse.html | |
# natural scrolling | |
# natürliche scroll-richtung für die maus | |
#setup: | |
# @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/josy1024/f2cca5e49ec60ae7ed3c514bb2159051/raw/d66997f73296f7f66fc027e940d84dbcf0f86f73/flipflop-mouse-scrolling.ps1'))" | |
Get-ChildItem HKLM:\SYSTEM\CurrentControlSet\Enum\HID\ -recurse -ErrorAction SilentlyContinue | | |
Get-ItemProperty | | |
Where-Object{ | |
$_.FlipFlopWheel -match '0' | |
} | Set-ItemProperty -Name FlipFlopWheel -value 1 | |
$os = Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object -ExpandProperty Caption | |
if ($os -like "*Windows 11*") { | |
$mousepaths = Get-ChildItem HKLM:\SYSTEM\CurrentControlSet\Enum\HID\ -recurse -ErrorAction SilentlyContinue | | |
Get-ItemProperty | | |
Where-Object{ | |
$_.MfG -match 'msmouse.inf' | |
} | |
foreach ($hidpath in $mousepaths.PSPath) { | |
$want = $hidpath + "\Device Parameters" | |
get-itemproperty $want |Set-ItemProperty -Name FlipFlopWheel -value 1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment