A premium, native macOS application designed to display a web browser and a PDF viewer rotated by 90 degrees (Landscape to Portrait).
Because MacBooks do not have built-in monitor rotation capabilities, Vecto allows you to rotate your sheet music, chord charts, or reference displays onto a physically pivoted external monitor while macOS remains in its default landscape layout. It is tailored for musicians, live performers, and kiosk setups, and is fully optimized for remote control using a standard Bluetooth mouse, a page-turner pedal, or a compact Bluetooth 2-button keyset.
The name Vecto is derived from vector, representing direction and magnitude. In mathematics and physics, vectors define heading and coordinate translation. Because the app dynamically redirects input coordinate vectors and realigns physical screen layouts to match your rotated display, Vecto perfectly embodies this alignment transformation.
- Visual Rotation Consistency: visual layout is rotated 90 degrees CW using native center-rotation mechanisms.
- Hybrid Coordinate & Mouse Routing:
- Cocoa Views (
WKWebView,PDFView, and descendants): Intercepts and forwards clicks/drags directly to bypass WebKit's window-dispatch rotated coordinate bug. - SwiftUI Controls (like Tab buttons): Lets standard mouse events fall through to
super.sendEvent, ensuring AppKit's native rotation-aware conversion maps coordinates for hover states and SwiftUI gestures perfectly.
- Cocoa Views (
- Scroll Wheel Alignment: Swaps scroll wheel axis inputs dynamically so pushing a scroll wheel physically forward moves content in the expected logical direction.
- Keyboard Passthrough Pipeline: Includes a surgical focus acquisition wrapper ensuring key inputs (like typing search terms or notes) are fed directly into the active browser fields without losing focus.
- Always-on-Top Floating Window: Configured to float frontmost over all other apps (ideal for overlaying sheet music, chord charts, or reference displays).
- Keyboard Shortcuts:
Cmd + 1: Switch to Web Browser TabCmd + 2: Switch to PDF Viewer TabCtrl + Tab: Toggle between active tabsOpt + O: Open macOS native PDF File Browser
- RotatedBrowserApp.swift: Contains the
RotatedWindowsubclass (scroll/key mapping, subview forwarding, shortcut routing) and the launch/floating configuration. - ContentView.swift: Holds the visual tab container, button layouts, and switch notification observers.
- WebView.swift: Custom wrapper around
WKWebViewthat explicitly enforces first responder status on clicks to capture key events securely. - PDFViewWrapper.swift: Native wrapper around
PDFViewto handle auto-scaling of document inputs. - Package.swift: Standard Swift Package Manager configuration, making the codebase directly compatible with Xcode and standalone swiftc compiler tools.
- macOS 14.0 or later
- Swift 5.9+ compiler tools (Xcode CommandLine Tools)
We include a simple compilation script to build and execute the application locally:
# Set execution permission on build script
chmod +x build_and_run.sh
# Compile and launch the application
./build_and_run.shSince the repository is structured as a Swift Package Manager executable, you can open the project directly inside Xcode:
- Open Xcode and select File > Open.
- Select the directory containing
Package.swift. - Choose the
net.j4dy.Vectoscheme and click Run (⌘R).
Since this beta build is not code-signed using a paid Apple Developer Account, Gatekeeper may block launch or warn that the application file is "damaged" upon installation.
- In Finder, locate
Vectoinside/Applicationsor your target folder. - Right-click (or Control-click) the application icon and choose Open from the context menu.
- In the dialog, click Open again to confirm.
Alternatively, you can strip the system quarantine flag off the application bundle by running this command:
xattr -d com.apple.quarantine /Applications/Vecto.app