sindresorhus/KeyboardShortcuts
⌨️ Add user-customizable global keyboard shortcuts (hotkeys) to your macOS app in minutes observed · 2026-08-28
Health v2 · maintenance only
91/100
- Activity 88
- Release rhythm 89
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 16
- age_days: 2309
- days_rel: 77
- days_push: 77
- n_releases_24m: 10
Adoption not part of the score
2700 stars · 248 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A Swift package that lets macOS developers add user-customizable global keyboard shortcuts (hotkeys) to their apps with minimal code. It provides SwiftUI and Cocoa recorder components, persists shortcuts to UserDefaults, and warns about conflicts with system shortcuts.
Use cases
- add user-customizable global hotkeys to a macOS app
- let users record keyboard shortcuts in a settings screen
- register global key listeners in Swift
- avoid conflicts with system keyboard shortcuts
- add hotkey support to a SwiftUI macOS app
- persist user keyboard shortcut preferences
When to choose
- you're building a macOS app in Swift and want global hotkeys quickly
- you need a ready-made shortcut recorder UI for SwiftUI or Cocoa
- you want Mac App Store-compatible, sandboxed hotkey support
When to avoid
- you need cross-platform keyboard shortcut handling
- your app targets iOS or other non-macOS platforms
- you need in-app-only (non-global) key handling
Facets
library · maturity stable
ui-components developer-tools operating-systems developer-tools desktop-applications keyboard-shortcuts hotkeys swiftui swift-package-manager cocoa macos swift desktop
1 source
- readme: https://github.com/sindresorhus/KeyboardShortcuts · fetched 2026-08-28 · 2d3f111bb346
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| sindresorhus/KeyboardShortcuts | main | 91 |
For agents
markdown · JSON · MCP: product_card(name="sindresorhus/KeyboardShortcuts")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem