I implemented a ‘zoom’ based on Scroll wheel events.
Scroll one way, zoom in, scroll the other,zoom out
I had some feedback from people telling me that I had the direction / effect back to front, so I added a user preference to reverse the direction.
But I realised the OS already has this.
Does anyone know a cross platform way of telling which way the scroll wheel should act so that I can duplicate the OS behaviour?
On Mac, this works: defaults read -g com.apple.swipescrolldirection
Windows (only tested 10) is more work. You need to determine the hardware ID of the device (trackpad/mouse/both…), open its key in the HKLM\\System\\CurrentControlSet\\Enum\\HID hive, and check the FlipFlopWheel value. Note that MS has removed the user preference setting for this in Win 10 (in 1903 anyway).