Screenshot2Clipboard is a native macOS menu-bar utility for capturing screenshots directly to the clipboard. It is designed for fast sharing into chat apps, docs, and AI assistants, with optional JPEG compression so screenshots are smaller before you paste them.
The app has no Dock icon. It lives in the menu bar, registers global shortcuts, and uses macOS's native screenshot selector for region captures.
Features
- Menu-bar-only macOS app built with Swift and SwiftUI.
- Full-screen screenshot to clipboard.
- Selected-area screenshot to clipboard using the native macOS crosshair selector.
- Configurable global shortcuts using Carbon hot keys.
- Default shortcuts:
- Full screen:
Control + Option + Command + 3 - Selected area:
Control + Option + Command + 4
- Full screen:
- Shortcut hints shown next to the capture menu items.
- JPEG compression presets:
LowestLowMediumHigh
- Last capture metrics in the menu:
- megapixels
- pixel dimensions
- compressed clipboard image size
- Launch-at-login toggle.
- Screen Recording permission shortcut.
Requirements
- macOS 13.0 or later
- Xcode with Swift 6 support
How It Works
Screenshot2Clipboard uses macOS's built-in /usr/sbin/screencapture command:
- Full screen capture is written to a temporary PNG.
- Selected-area capture uses macOS's native interactive selector and writes to a temporary PNG.
- The app decodes the PNG with ImageIO, optionally downsizes it based on the selected quality preset, encodes it as JPEG, and writes the JPEG data to the system pasteboard.
- The temporary PNG is deleted after processing.
This keeps the capture behavior native while giving the user control over how large the pasted image will be.
Permissions
macOS requires Screen Recording permission for screenshot capture.
If capture fails because permission is missing:
- Open the menu-bar app.
- Choose
Check Permissions. - Enable Screen Recording for Screenshot2Clipboard in System Settings.
- Relaunch the app if macOS asks you to.
Global shortcuts are implemented with Carbon RegisterEventHotKey, so they do not require Accessibility permission.
Build Locally
Clone the repository:
git clone https://github.com/sauravtom/Screenshot2Clipboard.git
cd Screenshot2ClipboardBuild a Debug app:
xcodebuild \ -project Screenshot2Clipboard.xcodeproj \ -scheme Screenshot2Clipboard \ -configuration Debug \ -derivedDataPath build/DerivedData \ build
Run the Debug app:
open build/DerivedData/Build/Products/Debug/Screenshot2Clipboard.app
Build a Release app:
xcodebuild \ -project Screenshot2Clipboard.xcodeproj \ -scheme Screenshot2Clipboard \ -configuration Release \ -derivedDataPath build/DerivedData \ build
Run the Release app:
open build/DerivedData/Build/Products/Release/Screenshot2Clipboard.app
Install the Release app into /Applications:
ditto build/DerivedData/Build/Products/Release/Screenshot2Clipboard.app /Applications/Screenshot2Clipboard.app open /Applications/Screenshot2Clipboard.app
Development
Open the project in Xcode:
open Screenshot2Clipboard.xcodeproj
Main files:
Screenshot2Clipboard/Screenshot2ClipboardApp.swift- menu-bar UI and app entry point.Screenshot2Clipboard/AppState.swift- application state, shortcut persistence, capture actions, and status messages.Screenshot2Clipboard/CaptureService.swift- screenshot execution, image compression, and clipboard writing.Screenshot2Clipboard/HotKeyManager.swift- global shortcut registration.Screenshot2Clipboard/ShortcutSettingsView.swift- shortcut recording UI.Screenshot2Clipboard/CompressionSetting.swift- compression presets and capture metrics.Screenshot2Clipboard/PermissionController.swift- Screen Recording permission flow.Screenshot2Clipboard/LaunchAtLoginController.swift- launch-at-login integration.
Release Archive
To create a macOS archive:
xcodebuild archive \ -project Screenshot2Clipboard.xcodeproj \ -scheme Screenshot2Clipboard \ -configuration Release \ -destination "generic/platform=macOS" \ -archivePath "build/AppStore/Screenshot2Clipboard.xcarchive"
For App Store Connect distribution, export the archive with your own team ID and signing setup. Create an export options plist locally, for example at build/ExportOptions-appstore.plist:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>destination</key> <string>export</string> <key>method</key> <string>app-store-connect</string> <key>signingStyle</key> <string>automatic</string> <key>teamID</key> <string>YOUR_TEAM_ID</string> </dict> </plist>
Then export:
xcodebuild -exportArchive \ -archivePath "build/AppStore/Screenshot2Clipboard.xcarchive" \ -exportPath "build/AppStore/export" \ -exportOptionsPlist "build/ExportOptions-appstore.plist" \ -allowProvisioningUpdates
build/ is intentionally ignored by Git. Keep local export option plists and generated packages out of the repository unless you are intentionally documenting a reusable release setup.
Notes
- The app is sandboxed for Mac App Store distribution.
- The app is configured with
LSUIElement=true, so it does not show a Dock icon. - The bundle identifier in this project is
com.saurav.Screenshot2Clipboard; change it before distributing under a different developer account. - Screen Recording permission is granted per app identity. If you change the signing identity or bundle identifier, macOS may ask for permission again.
License
MIT License. See LICENSE.