I tried several 3rd party solutions which allow to set the scroll direction independently (like
Scroll Reverser).
But all of them break swipe gestures to some extend (like two-finger-swipe in Safari to get to the previous page).
I finally wrote an Apple Script that checks if my Bluetooth mouse is connected or not and ticks 'Natural Scrolling' accordingly.
In my case I have it as login item but there are numerous ways to trigger it.
- You have to specify the name of your mouse in the first line.
- As I still use
macOS Big Sur, that's what I wrote it for but it should be a good starting point (in case this is a viable workaround for you).
AppleScript:
set the_mouse_name to "Magic-Mouse-2"
-- check if bluetooth mouse is currently connected
set mouse_connected to (do shell script "system_profiler SPBluetoothDataType | sed '1,/" & the_mouse_name & "/d' | grep \"Connected: \" | head -1") as string
if mouse_connected contains "Connected: Yes" then
set scroll_direction_natural to 0
else
set scroll_direction_natural to 1
end if
-- check if natural scrolling is currently active
set swipescrolldirection to (do shell script "defaults read -g com.apple.swipescrolldirection")
-- adjust natural scrolling (if necessary) by opening system preferences
if swipescrolldirection as number is not scroll_direction_natural as number then
tell application "System Preferences"
reveal pane "Trackpad"
activate
end tell
delay 0.5
tell application "System Events" to tell process "System Preferences"
click radio button 2 of tab group 1 of window "Trackpad"
click checkbox 1 of tab group 1 of window "Trackpad"
end tell
delay 0.5
tell application "System Preferences" to quit
end if
To get the correct button/checkbox identifiers for Ventura, you can record your clicks with Automator and inspect your actions as Apple Script.