# soffes/HotKey

Simple global shortcuts in macOS

Repository: https://github.com/soffes/HotKey
Canonical: https://ross.abutalabs.com/products/soffes-hotkey
Language: Swift
License: MIT
License Family: permissive
Topics: swift, macos, appkit, carbon, keyboard, shortcut, carthage
Last push: 2024-12-29T05:53:35+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3330, "days_push": 612, "days_rel": 612, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1080, forks 88 (observed 2026-08-28T04:03:30.454546+00:00)

## What it is
HotKey is a small Swift library that wraps the Carbon APIs to make registering global keyboard shortcuts in macOS apps easy. It provides a simple HotKey object with key down/up handlers managed automatically by object lifecycle.

## Use cases
- register a global hotkey in a mac app
- trigger an action with a system-wide keyboard shortcut
- add a global shortcut like cmd+option+R to my macOS app
- wrap Carbon hot key APIs in Swift
- handle key down and key up events for global shortcuts

## When to choose
- you're building a macOS app in Swift that needs system-wide keyboard shortcuts
- you want a simple, lightweight wrapper instead of dealing with Carbon APIs directly
- you prefer automatic handler registration/unregistration tied to object lifecycle

## When to avoid
- you need shortcuts scoped only within your app's windows (use AppKit's native key equivalents)
- you're targeting iOS or other non-macOS platforms
- you need complex hotkey conflict resolution or recording UI

## Facets
- artifact type: library
- maturity: stable
- function: sdk, developer-tools
- domain: operating-systems, developer-tools, desktop-applications
- platform: -
- tags: global-hotkeys, keyboard-shortcuts, carbon-api, appkit, swift-package-manager, macos, swift

## Member repositories
- soffes/HotKey (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:30.454546+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:53:00.683761+00:00, confidence not recorded.
  - readme: https://github.com/soffes/HotKey (fetched 2026-08-28T04:03:30.454546+00:00, sha c9fed434a828)
- Data as of 2026-08-30T08:39:29.467469+00:00.
