Skip to content

Commit

Permalink
Fix Mouse Acceleration persistance after reboot (#102)
Browse files Browse the repository at this point in the history
- Changed Type to String.
  • Loading branch information
LeDragoX committed Oct 11, 2023
1 parent 268773d commit c6ece6d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/utils/Individual-Tweaks.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -274,19 +274,19 @@ function Enable-LegacyContextMenu() {
function Disable-MouseAcceleration() {
Write-Status -Types "-", "Misc" -Status "Disabling Mouse Acceleration..."
$SysPvParam = @(0, 0, 0)
Set-ItemPropertyVerified -Path "$PathToCUMouse" -Name "MouseSpeed" -Type DWord -Value $SysPvParam[0]
Set-ItemPropertyVerified -Path "$PathToCUMouse" -Name "MouseThreshold1" -Type DWord -Value $SysPvParam[1]
Set-ItemPropertyVerified -Path "$PathToCUMouse" -Name "MouseThreshold2" -Type DWord -Value $SysPvParam[2]
[System.Win32]::SystemParametersInfo(4, 0, $SysPvParam, 2)
Set-ItemPropertyVerified -Path "$PathToCUMouse" -Name "MouseSpeed" -Type String -Value $SysPvParam[0]
Set-ItemPropertyVerified -Path "$PathToCUMouse" -Name "MouseThreshold1" -Type String -Value $SysPvParam[1]
Set-ItemPropertyVerified -Path "$PathToCUMouse" -Name "MouseThreshold2" -Type String -Value $SysPvParam[2]
}

function Enable-MouseAcceleration() {
Write-Status -Types "*", "Misc" -Status "Enabling Mouse Acceleration..."
$SysPvParam = @(1, 6, 10)
Set-ItemPropertyVerified -Path "$PathToCUMouse" -Name "MouseSpeed" -Type DWord -Value $SysPvParam[0]
Set-ItemPropertyVerified -Path "$PathToCUMouse" -Name "MouseThreshold1" -Type DWord -Value $SysPvParam[1]
Set-ItemPropertyVerified -Path "$PathToCUMouse" -Name "MouseThreshold2" -Type DWord -Value $SysPvParam[2]
[System.Win32]::SystemParametersInfo(4, 0, $SysPvParam, 2)
Set-ItemPropertyVerified -Path "$PathToCUMouse" -Name "MouseSpeed" -Type String -Value $SysPvParam[0]
Set-ItemPropertyVerified -Path "$PathToCUMouse" -Name "MouseThreshold1" -Type String -Value $SysPvParam[1]
Set-ItemPropertyVerified -Path "$PathToCUMouse" -Name "MouseThreshold2" -Type String -Value $SysPvParam[2]
}

# Code from: https://answers.microsoft.com/en-us/windows/forum/all/set-the-mouse-scroll-direction-to-reverse-natural/ede4ccc4-3846-4184-a86d-a028515040c0
Expand Down

0 comments on commit c6ece6d

Please sign in to comment.