HackerTrans
TopNewTrendsCommentsPastAskShowJobs

aptgetrekt

no profile record

Submissions

Show HN: UnnaturalScrollWheels – Better scroll wheel settings for macOS

github.com
176 points·by aptgetrekt·6 yıl önce·86 comments

comments

aptgetrekt
·6 yıl önce·discuss
That's actually where I got the idea from! My app works the same way except uses Swift instead of Objective C.
aptgetrekt
·6 yıl önce·discuss
Looks like it, yes. I don't use any special private APIs, just the public ones that you can use in apps on the app store. They need the accessibility permission to "Control your computer". Apps like BetterSnapTool/Magnet work with the same permission. Here's the code that actually intercepts scroll events: https://github.com/ther0n/UnnaturalScrollWheels/blob/master/...
aptgetrekt
·6 yıl önce·discuss
I think the magic mouse is treated like a trackpad under the hood so all the gestures work. If someone with a magic mouse tried to uncheck the natural scrolling box under mouse they'd be confused as to why it didn't change so that could be why the two settings are "linked".
aptgetrekt
·6 yıl önce·discuss
I don't know much about macOS development, 72 hours ago I had never done any at all! But as far as I can tell anything you could do in Objective C you can also do in Swift. I would have made a preference pane and would prefer it myself but I explained why I didn't in another comment. Apple kind of discourages preference panes unfortunately.
aptgetrekt
·6 yıl önce·discuss
This is actually Apple's fault more than anyone. I was originally planning to release on the App Store but decided not to after thinking about the $100 a year fee to be in the developer program and the 30% cut Apple would take if it were paid, and that's assuming the app would be approved by Apple in the first place. Although I decided not to release on the App Store I want to keep the option open. Apps on the App Store need to be sandboxed, which means no preference pane.

I agree apps filling up the menu bar is annoying, so there is an option to hide it if you wish.
aptgetrekt
·6 yıl önce·discuss
You can actually change the scroll direction of a mouse in Windows with a registry edit: https://answers.microsoft.com/en-us/windows/forum/windows_10...
aptgetrekt
·6 yıl önce·discuss
I could probably get used to it if I used only macOS, but I use Linux and Windows most of the time and switching scroll directions when I use macOS gets frustrating. That and physical scroll wheels scrolling "unnaturally" is what seems natural to me, @dashwav explains why I feel that way quite well in their reply to another comment.
aptgetrekt
·6 yıl önce·discuss
You're welcome! Scroll Reverser no longer working well in Catalina is one of the main reasons that led me to create my own solution to the problem.
aptgetrekt
·6 yıl önce·discuss
Yeah I think the exact same way! The top of the physical wheel spins the opposite direction of the bottom of the wheel which would be "touching" the page/content. Originally I was going to just make a background script to automatically toggle the option when it detects certain USB devices (like my mouse) but I couldn't find a way to apply settings changed via the "defaults write" command without logging out and then back in. In my research I came across discrete-scroll and scroll reverser on GitHub. Discrete-scroll worked in Catalina but had no GUI, and Scroll Reverser didn't work reliably on Catalina. So I combined the ideas from both in as little Swift code as possible so that anyone using my app wouldn't need to worry about allowing the app to "control your computer".