How ther0n/unnaturalscrollwheels works
1. AutoLauncher – This component appears to be a dedicated small executable (with its own AppDelegate, main.swift, etc.) which likely handles launching the main application automatically (e.g., at system startup or when needed). It has its own entitlements, indicating that it might have specific permissions separate from the main application.
• Bridging header files which suggest that this project might integrate some Objective-C components if needed.
Main Components
• UnnaturalScrollWheels Application Core:
• UI Module: Includes the menu bar item, preferences window, and related storyboard/layout files.
• Scroll Interception Module: Encapsulated in ScrollInterceptor.swift along with related modules (like DisableMouseAccel.swift) that handle the logic for inverting the scroll direction.
• Preferences/Settings Module: Managed through Options.swift and coordinated with the PreferencesViewController, ensuring user preferences are applied.
External/System Interactions
• macOS System Settings: While not directly controlled by the app, including an indicator for system settings (e.g., Mouse and Trackpad settings) can help explain the problem context the app is addressing.
Architectural Patterns/Design Principles
• Separation of Concerns: Emphasize the clear split between UI components (menu bar, preferences view) and backend event handling (scroll interception, disabling acceleration, etc.).
• Modularity: The division between the AutoLauncher and the main application underscores an approach to keep the auto-launch functionality isolated from the core logic.
• How the AutoLauncher initiates the main application.
• How the UI (preferences window) sends updates to the Options module, which in turn affects the behavior of the Scroll Interceptor.
• The data flow between the Scroll Interceptor and the macOS Accessibility APIs.