用了 Mos 并不能实现在”iPhone 镜像“的反转滚轮方向用着很别扭,跟 Gemini 聊了一会写了个脚本
格式为 AppleScript ,可以直接用这个快捷指令用聚焦来唤起执行,切换就很方便了
https://www.icloud.com/shortcuts/fff70a282668481da502b81461437c4d
⚠️记得在隐私与安全-辅助功能-给“聚焦”和“快捷指令”赋予权限
如果你有其他工具来切换的话可以直接用下面的代码执行脚本,问了 AI 听说可以利用 Hammerspoon 检测鼠标拔插事件来自动执行,我还是更喜欢手动执行,可以自行研究下。
do shell script "open 'x-apple.systempreferences:com.apple.Mouse-Settings.extension'"
tell application "System Events"
tell process "System Settings"
set maxWaitTime to 30
set retryCount to 0
set isClicked to false
repeat until isClicked or retryCount > maxWaitTime
try
click checkbox "自然滚动" of group 1 of scroll area 1 of group 1 of group 3 of splitter group 1 of group 1 of window 1
set isClicked to true
on error
delay 0.1
set retryCount to retryCount + 1
end try
end repeat
end tell
end tell
quit application "System Settings"
PS:不知道为什么 Apple 连鼠标和触控板两个地方的滚轮方向单独切换都做不到,实在是蠢透了。。。