Add user-customizable global keyboard shortcuts to macOS apps with SwiftUI and Cocoa support.
KeyboardShortcuts is a Swift package that enables macOS developers to add support for user-customizable global keyboard shortcuts (hotkeys) to their apps. It provides a recorder UI for users to set shortcuts, handles storage and conflict detection, and is designed to be sandboxed and Mac App Store compatible.
macOS developers building SwiftUI or Cocoa apps that require global keyboard shortcuts, particularly those distributing through the Mac App Store or needing sandbox compliance.
Developers choose KeyboardShortcuts for its Swift-native API, seamless integration with both SwiftUI and Cocoa, built-in sandbox compatibility, and production-ready features like shortcut conflict detection and NSMenuItem integration.
⌨️ Add user-customizable global keyboard shortcuts (hotkeys) to your macOS app in minutes
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers a modern, swifty interface that integrates seamlessly with SwiftUI and Cocoa, as emphasized in its philosophy and comparison with MASShortcut.
Designed to work within macOS sandboxing constraints, making it ready for Mac App Store distribution, a key selling point in the description.
Provides ready-to-use recorder components (Recorder for SwiftUI, RecorderCocoa for Cocoa) that handle storage and conflict warnings, simplifying implementation.
Automatically warns users if a chosen shortcut conflicts with system or app menu shortcuts, improving user experience as stated in the key features.
Does not support media keys, limiting functionality for apps that handle multimedia shortcuts, as admitted in the FAQ due to sandbox constraints.
Uses deprecated Carbon APIs for global shortcut registration, introducing potential future compatibility risks, though the FAQ downplays this concern.
The scope is based on the author's personal needs, so it may lack advanced configurability or features required by some projects, as noted in the README.
Only supports Swift Package Manager, with no built-in integration for CocoaPods or Carthage, which could complicate adoption in legacy projects.