Last active
November 8, 2021 23:32
-
-
Save rbeesley/5575c85ef85954f509fc499ff31061b3 to your computer and use it in GitHub Desktop.
Use the scroll wheel the way it was intended. Run as an Administrator. This configures all mice scroll wheels to use Natural Scrolling or Australian Scrolling. Instead of the mouse wheel controlling the scrollbar thumb, it relates to the content you're viewing. Up on the scroll wheel equates to scrolling the page up.
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
$mice = Get-PnpDevice | Where-Object {$_.FriendlyName -like "*mouse*"} | |
$updatedMice = @() | |
$ErrorActionPreference = "Stop" | |
foreach ($mouse in $mice) { | |
$mouseDeviceParametersPath = $(Join-Path $(Join-Path "HKLM:\SYSTEM\CurrentControlSet\Enum\" $mouse.InstanceId) "Device Parameters") | |
$mouseDeviceParameters = Get-ItemProperty $mouseDeviceParametersPath | |
$flipFlopWheel = $mouseDeviceParameters.FlipFlopWheel | |
if (($null -ne $flipFlopWheel) -And (0 -eq $flipFlopWheel)) { | |
$flipFlopWheel = 1 | |
Set-ItemProperty $mouseDeviceParametersPath -Name "FlipFlopWheel" -Value $flipFlopWheel | |
$updatedMice += $mouse | |
} | |
} | |
if ($updatedMice.Count -gt 0) { | |
foreach ($mouse in $updatedMice) { | |
Write-Host "Disabling $(($mouse).FriendlyName)" | |
$mouse | Disable-PnpDevice -Confirm:$false | |
} | |
Start-Sleep -Seconds 5 | |
foreach ($mouse in $updatedMice) { | |
Write-Host "Enabling $(($mouse).FriendlyName)" | |
$mouse | Enable-PnpDevice -Confirm:$false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated to be a little smarter about how it changes parameters. This will only disable and then reenable if the mouse setting needed to be updated. This should clean up some of the noise and provides a cleaner output when this is ran.