A premium, native macOS application designed to display a web browser and a PDF viewer rotated by 90 degrees clockwise (Physical Top = Logical Left).
This app is tailored for musicians, live performers, and kiosk installations using physical displays mounted in portrait orientation while macOS remains in its default landscape orientation.
Explore complete setup instructions, details about coordinate mapping, and get the latest release installer at: 👉 Documentation & Landing Page
- 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.RotatedBrowserAppscheme and click Run (⌘R).
Since this pre-alpha 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
RotatedBrowserAppinside/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/RotatedBrowserApp.app