·global-hotkeys
</>

global-hotkeys

System-wide keyboard shortcut registration on macOS using NSEvent monitoring (simple, app-level) and Carbon EventHotKey API (reliable, system-wide). Covers NSEvent.addGlobalMonitorForEvents and addLocalMonitorForEvents, CGEvent tap for keystroke simulation, Carbon RegisterEventHotKey for system-wide hotkeys, modifier flag handling (.deviceIndependentFlagsMask), common key code mappings, debouncing, Accessibility permission requirements (AXIsProcessTrusted), and SwiftUI .onKeyPress for in-app shortcuts. Use when implementing global keyboard shortcuts, hotkey-triggered panels, or system-wide key event monitoring.

5Installs·0Trend·@makgunay

Installation

$npx skills add https://github.com/makgunay/claude-swift-skills --skill global-hotkeys

How to Install global-hotkeys

Quickly install global-hotkeys AI skill to your development environment via command line

  1. Open Terminal: Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.)
  2. Run Installation Command: Copy and run this command: npx skills add https://github.com/makgunay/claude-swift-skills --skill global-hotkeys
  3. Verify Installation: Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw

Source: makgunay/claude-swift-skills.

SKILL.md

View raw

Common Key Codes | Key | Code | Key | Code | Key | Code |

| Space | 49 | Return | 36 | Escape | 53 | | Tab | 48 | Delete | 51 | A | 0 | | S | 1 | D | 2 | F | 3 | | J | 38 | K | 40 | L | 37 |

| Hotkey works everywhere except own app | Add local monitor alongside global monitor | | Modifier comparison fails | Mask with .deviceIndependentFlagsMask | | Hotkey fires twice | Debounce with timestamp check (0.3s threshold) | | Doesn't work on first launch | Check/request Accessibility permission |

System-wide keyboard shortcut registration on macOS using NSEvent monitoring (simple, app-level) and Carbon EventHotKey API (reliable, system-wide). Covers NSEvent.addGlobalMonitorForEvents and addLocalMonitorForEvents, CGEvent tap for keystroke simulation, Carbon RegisterEventHotKey for system-wide hotkeys, modifier flag handling (.deviceIndependentFlagsMask), common key code mappings, debouncing, Accessibility permission requirements (AXIsProcessTrusted), and SwiftUI .onKeyPress for in-app shortcuts. Use when implementing global keyboard shortcuts, hotkey-triggered panels, or system-wide key event monitoring. Source: makgunay/claude-swift-skills.

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/makgunay/claude-swift-skills --skill global-hotkeys
Category
</>Dev Tools
Verified
First Seen
2026-02-25
Updated
2026-03-10

Browse more skills from makgunay/claude-swift-skills

Quick answers

What is global-hotkeys?

System-wide keyboard shortcut registration on macOS using NSEvent monitoring (simple, app-level) and Carbon EventHotKey API (reliable, system-wide). Covers NSEvent.addGlobalMonitorForEvents and addLocalMonitorForEvents, CGEvent tap for keystroke simulation, Carbon RegisterEventHotKey for system-wide hotkeys, modifier flag handling (.deviceIndependentFlagsMask), common key code mappings, debouncing, Accessibility permission requirements (AXIsProcessTrusted), and SwiftUI .onKeyPress for in-app shortcuts. Use when implementing global keyboard shortcuts, hotkey-triggered panels, or system-wide key event monitoring. Source: makgunay/claude-swift-skills.

How do I install global-hotkeys?

Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/makgunay/claude-swift-skills --skill global-hotkeys Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw

Where is the source repository?

https://github.com/makgunay/claude-swift-skills

Details

Category
</>Dev Tools
Source
skills.sh
First Seen
2026-02-25