# soffes/hotkey

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/soffes-hotkey).**

1,077 stars · 91 forks · Swift · MIT

## Links

- GitHub: https://github.com/soffes/HotKey
- awesome-repositories: https://awesome-repositories.com/repository/soffes-hotkey.md

## Topics

`appkit` `carbon` `carthage` `keyboard` `macos` `shortcut` `swift`

## Description

HotKey is a developer library for registering system-wide keyboard shortcuts in macOS applications. It binds modifier keys and key codes to system-wide identifiers using native operating system event hooks, allowing applications to respond to key combinations while running in the background.

The library executes custom closures asynchronously when native keyboard monitor notifications match registered global shortcut signatures. It handles both press and release events, and automatically unregisters system hot key bindings during object deallocation to prevent stale event listeners and memory leaks.

## Tags

### Development Tools & Productivity

- [Global Keyboard Shortcuts](https://awesome-repositories.com/f/development-tools-productivity/global-keyboard-shortcuts.md) — Binds system-wide keyboard shortcuts to specific key combinations so actions trigger even in the background. ([source](https://github.com/soffes/hotkey#readme))
- [Global Hotkey Managers](https://awesome-repositories.com/f/development-tools-productivity/global-hotkey-managers.md) — Listens for global key combinations across the operating system to execute custom callbacks.
- [Cocoa Global Keyboard Libraries](https://awesome-repositories.com/f/development-tools-productivity/global-keyboard-shortcuts/cocoa-global-keyboard-libraries.md) — Provides a developer library for binding modifier keys and key codes to system-wide identifiers.
- [Carbon Hot Key Registrations](https://awesome-repositories.com/f/development-tools-productivity/input-binding-libraries/command-key-bindings/browser-wide-key-bindings/carbon-hot-key-registrations.md) — Binds modifier keys and key codes to system-wide identifiers through the native application services framework.
- [Menu Bar Hotkey Tools](https://awesome-repositories.com/f/development-tools-productivity/menu-bar-hotkey-tools.md) — Powers lightweight background macOS utilities that respond instantly to global hotkeys.

### Operating Systems & Systems Programming

- [Global Keyboard Shortcuts](https://awesome-repositories.com/f/operating-systems-systems-programming/desktop-environment-frameworks/desktop-environment-components/desktop-application-utilities/global-keyboard-shortcuts.md) — Registers system-wide keyboard shortcuts that trigger custom callback actions in macOS applications.

### Software Engineering & Architecture

- [Callback Event Handlers](https://awesome-repositories.com/f/software-engineering-architecture/callback-event-handlers.md) — Executes custom closure callbacks asynchronously in response to global keyboard monitoring events.
- [Global Shortcut Interceptors](https://awesome-repositories.com/f/software-engineering-architecture/global-event-hooks/global-shortcut-interceptors.md) — Intercepts system-wide keyboard shortcuts and modifiers using native operating system event hooks.
- [Asynchronous Event Dispatchers](https://awesome-repositories.com/f/software-engineering-architecture/asynchronous-event-dispatchers.md) — Dispatches matched keyboard shortcut notifications asynchronously across execution queues.

### User Interface & Experience

- [Carbon Event-Driven Dispatchers](https://awesome-repositories.com/f/user-interface-experience/form-and-input-management/interaction-and-event-handling/event-handling-architectures/input-event-dispatchers/application-event-dispatching/carbon-event-driven-dispatchers.md) — Listens for system-wide keyboard events using native OS hooks and dispatches them directly to registered handlers.
- [Keyboard Event Listeners](https://awesome-repositories.com/f/user-interface-experience/interface-element-management/keyed-element-tracking/keyboard-event-listeners.md) — Monitors operating system keyboard events asynchronously in the background.
- [Keyboard Shortcut Managers](https://awesome-repositories.com/f/user-interface-experience/keyboard-shortcut-managers.md) — Triggers custom callback functions when registered global shortcut keys are pressed or released. ([source](https://github.com/soffes/hotkey#readme))
