不灭的焱

革命尚未成功,同志仍须努力 下载Java21

作者:AlbertWen  添加时间:2026-07-16 18:54:59  修改时间:2026-07-27 00:17:30  分类:03.运维管理  编辑

目录

可以通过 PowerShell 一键修改注册表,让 Windows 10 鼠标滚轮变成和 macOS 一样的“自然滚动”方向。

一键开启自然滚动

  1. 右键点击“开始菜单”
  2. 打开 Windows PowerShell(管理员)
  3. 粘贴并执行:
Get-ChildItem 'HKLM:\SYSTEM\CurrentControlSet\Enum\HID' -Recurse -ErrorAction SilentlyContinue |
Where-Object { $_.PSChildName -eq 'Device Parameters' } |
ForEach-Object {
    Set-ItemProperty -Path $_.PSPath -Name 'FlipFlopWheel' -Value 1 -Type DWord -ErrorAction SilentlyContinue
}
Write-Host "自然滚动已开启,请重新插拔鼠标或重启电脑。" -ForegroundColor Green

执行完成后:

  • USB 鼠标:重新插拔
  • 无线鼠标:关闭再打开
  • 仍未生效:重启电脑

开启后滚动效果:

  • 滚轮向上:页面向下移动
  • 滚轮向下:页面向上移动

这就是 macOS 默认的自然滚动逻辑。

一键恢复 Windows 默认方向

管理员 PowerShell 执行:

Get-ChildItem 'HKLM:\SYSTEM\CurrentControlSet\Enum\HID' -Recurse -ErrorAction SilentlyContinue |
Where-Object { $_.PSChildName -eq 'Device Parameters' } |
ForEach-Object {
    Set-ItemProperty -Path $_.PSPath -Name 'FlipFlopWheel' -Value 0 -Type DWord -ErrorAction SilentlyContinue
}
Write-Host "Windows 默认滚动方向已恢复,请重新插拔鼠标或重启电脑。" -ForegroundColor Green