⌨️ Add user-customizable global keyboard shortcuts (hotkeys) to your macOS app in minutes
2.7k
Stars
247
Forks
1
Open issues
30
Contributors
AI Analysis
KeyboardShortcuts is a Swift package that enables macOS app developers to add user-customizable global keyboard shortcuts (hotkeys) with minimal effort. It provides both SwiftUI and Cocoa components, handles system conflict detection, and is fully sandboxed and Mac App Store compatible. It serves macOS app developers specifically—not iOS, web, or cross-platform developers—and is already used in production by several established macOS applications.
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
Swift library for user-customizable macOS global keyboard shortcuts, battle-tested in production apps
KeyboardShortcuts is a Swift Package Manager library that enables macOS developers to add user-customizable global keyboard shortcuts to their apps with minimal boilerplate. It handles registration, UI recording, persistence, and event listening. The maintainer (Sindre Sorhus) has integrated it into several of his own production apps (Dato, Jiffy, Plash, Lungo), providing concrete adoption evidence within a specific, narrow scope: indie macOS developers building native apps.
Created May 2020 by Sindre Sorhus, a prolific open-source maintainer known for utility libraries. The project was built to solve a specific problem in his own apps and released as a reusable package. It has remained relatively stable, with the most recent push in June 2026 indicating ongoing (if light) maintenance.
Growth has been modest and linear rather than explosive. The project gained ~2,659 stars over 6 years, with only 10 stars in the last 7 days (as of July 2026), suggesting steady but not accelerating adoption. The growth appears driven by developer discovery within the macOS indie app ecosystem rather than viral adoption or enterprise adoption waves.
Four named production apps confirmed: Dato, Jiffy, Plash, and Lungo, all published by the maintainer himself. The README explicitly states these apps use the library. Additionally, the Plash repository is linked as a 'real-world example.' However, adoption beyond Sorhus's own apps is not verified. No public list of third-party users, no community testimonials, no case studies from independent developers. Adoption not verified outside Sorhus's ecosystem.
Based on README, the library provides: (1) a strongly-typed API for registering keyboard shortcuts via extension syntax; (2) a SwiftUI `Recorder` component and Cocoa `RecorderCocoa` alternative for UI; (3) automatic persistence to UserDefaults; (4) system-level event listeners via `onKeyUp()` and `onKeyDown()`; (5) conflict detection with system and app menu shortcuts. Likely uses EventKit or low-level macOS event taps for global key monitoring. Appears to abstract away sandboxing complexity for Mac App Store apps.
Not documented in README. No mention of test files, CI/CD pipeline, or test coverage metrics.
Last push 2026-06-17 (19 days before evaluation date), indicating active but infrequent maintenance. README states 'PRs welcome' and explicitly notes 'What you see here is just what I needed for my own apps,' suggesting the maintainer prioritizes stability over feature expansion. Version 3.0.1 suggests the API has stabilized. No evidence of breaking changes or major refactors in recent history.
ADOPT IF: you are building a native macOS app in Swift, targeting the Mac App Store or need sandboxed global shortcuts, and want minimal boilerplate for user-customizable hotkeys. The API is clean, the library is actively maintained (if conservatively), and it has proven stability in production. AVOID IF: you need cross-platform keyboard shortcuts (iOS, Linux, Windows), require extensive customization beyond the current feature set, or depend on rapid feature iteration and active community support. The library is intentionally scoped to one person's needs and may not grow or adapt to divergent requirements. MONITOR IF: you are considering this but uncertain about long-term maintainability; the project is healthy but depends on one maintainer and shows no signs of community-driven expansion.
Independent dimensions
Mainstream potential
3/10
Technical importance
6/10
Adoption evidence
4/10
- Single-maintainer project: future support depends entirely on Sindre Sorhus's continued involvement. No indication of succession planning or transfer of ownership.
- Limited adoption evidence: confirmed use only within Sorhus's own apps. No public testimonials, community plugins, or integration in widely-used frameworks. Adoption outside this ecosystem is unverified.
- Conservative feature set: README explicitly frames the library as 'just what I needed for my own apps,' suggesting expansion is low priority. Users with non-standard requirements may hit ceiling quickly.
- Test coverage opaque: no mention of automated tests, continuous integration, or quality gates in README. Maintenance quality inferred only from release history, not from testing practices.
- macOS-only scope: inherently limits addressable market to developers building native macOS apps (small fraction of total app developers). Network effects and ecosystem growth will be permanently capped.
Likely to remain stable, lightly maintained, and niche. May see gradual modest adoption among macOS indie developers, but unlikely to expand significantly in scope or user base. Will probably persist indefinitely as a working reference implementation rather than grow into a dominant category player. Possible consolidation or archival if Sorhus deprioritizes macOS development.
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Language
- Swift
- License
- MIT
- Last updated
- 3w ago
- Created
- 75mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Open pull requests
No open pull requests.
Top contributors
Recent releases
Similar repos
zenangst/KeyboardCowboy
Keyboard Cowboy is a macOS productivity application that enables users to...
KeyboardKit/KeyboardKit
KeyboardKit is a Swift/SwiftUI framework for creating custom iOS keyboard...
sindresorhus/Defaults
Defaults is a Swift library that wraps UserDefaults with a type-safe, modern...
RxSwiftCommunity/RxKeyboard
RxKeyboard provides a reactive API for observing iOS keyboard frame changes and...
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
2.7k | +10 | Swift | 8/10 | 3w ago |
|
|
2.2k | — | Swift | 7/10 | 1w ago |
|
|
1.8k | — | Swift | 7/10 | 1d ago |
|
|
2.5k | — | Swift | 9/10 | 2w ago |
|
|
1.6k | — | Swift | 7/10 | 2w ago |
|
|
22.4k | — | C++ | 8/10 | 5d ago |
2,204 stars; also Swift, also for macOS keyboard shortcuts. Likely serves similar use case but with different design philosophy. Direct comparison requires code inspection not available here.
22,423 stars; C++ system-wide keyboard remapper. Solves a related but distinct problem (OS-level key remapping vs. app-level shortcut configuration). Targets different user personas (power users vs. developers).
1,848 stars; Swift package for keyboard handling. May overlap in scope but README suggests different focus. Requires direct comparison unavailable here.
1,603 stars; RxSwift-based keyboard event stream. Reactive programming paradigm vs. callback-based; serves developers using Rx ecosystem.
2,476 stars; Sorhus's own package for UserDefaults management. KeyboardShortcuts likely uses or complements this for persistence.