Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pilotmoon/Scroll-Reverser
Per-device scrolling prefs on macOS.
https://github.com/pilotmoon/Scroll-Reverser
macos
Last synced: about 2 hours ago
JSON representation
Per-device scrolling prefs on macOS.
- Host: GitHub
- URL: https://github.com/pilotmoon/Scroll-Reverser
- Owner: pilotmoon
- License: apache-2.0
- Created: 2011-10-26T19:05:55.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2024-06-21T08:36:10.000Z (5 months ago)
- Last Synced: 2024-10-29T15:05:30.877Z (5 days ago)
- Topics: macos
- Language: Objective-C
- Homepage: https://pilotmoon.com/scrollreverser/
- Size: 9.07 MB
- Stars: 2,635
- Watchers: 24
- Forks: 140
- Open Issues: 42
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - Scroll-Reverser - Reverses the direction of macOS scrolling, with independent settings for trackpads and mice. (MacOS / JavaScript)
- awesome-hacking-lists - pilotmoon/Scroll-Reverser - Per-device scrolling prefs on macOS. (Objective-C)
README
# Scroll Reverser
Reverses the direction of scrolling on macOS, with independent settings for trackpads and mice.
## Download
For download links and more information, visit the **[Scroll Reverser home page](https://pilotmoon.com/scrollreverser/)**.
Downloads are also available in the GitHub releases tab.
## Notes
### Building
After cloning this repo, you'll need to `git submodule update --init` to check out the BuildScripts submodule.
If you try to build fresh out of the box you will get a build error because you don't have my code signing certificate. For best results, replace my certificate with your own Developer ID certificate in the Signing & Capabilities tab of the Scroll Reverser target settings in Xcode.
Debug builds produce an app with no app icon, named "Scroll Reverser (Dev)" and version "99999". This is the expected behaviour and the build is otherwise fully functional.
### How it works
The guts of the code is in MouseTap.m. Everything else is just user interface rigging.
Scroll Reverser installs an event tap, which gives it access to event stream, including scrolling events and gesture events. The main documentation about event taps is [Quartz Event Services Reference](https://developer.apple.com/library/mac/documentation/Carbon/Reference/QuartzEventServicesRef/).
To distinguish between trackpad and mouse, Scroll Reverser examines gesture events to determine whether there are two or more fingers on the trackpad. If so, it assumes scrolling is coming from the trackpad. Otherwise, mouse. (There's a little more to it than that, but that is the general idea.)
### Runtime debug log
Scroll Reverser's main event tap does not output debug info with NSLog because it would slow down event processing too much. Instead, it has some custom debug code which is more efficient to write to.
To display the debug window, Option(⌥)-click the Scroll Reverser menu bar icon.