diagnose-dead-global-hotkey

diagnose-dead-global-hotkey is a skill for Claude Code from terrylica/cc-skills. It costs 195 tokens per session (2,405 once invoked), scanned A, original, MIT.

A diagnostic workflow for macOS global keyboard shortcuts that work normally but fail when a particular application is active. It traces the key press through macOS input stages, remapping tools, event taps, and shortcut handling.

In plain words
What is it for?
Use it to investigate a screenshot shortcut, launcher, clipboard manager, or similar hotkey that fails only in one app or while an app is running. It helps separate keyboard remapping, event taps, the shortcut dispatcher, and the frontmost application as possible causes.
Why use it?
It helps identify which layer loses or changes the shortcut instead of guessing at application settings. This is useful when remote-desktop tools, virtual machines, or games affect global hotkeys.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the macro-keyboard plugin — 4 skills shipped together , and of cc-skills

Good fit Use it to investigate a screenshot shortcut, launcher, clipboard manager, or similar hotkey that fails only in one app or while an app is running. It helps separate keyboard remapping, event taps, the shortcut dispatcher, and the frontmost application as possible causes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/terrylica/cc-skills/diagnose-dead-global-hotkey
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add terrylica/cc-skills --skill diagnose-dead-global-hotkey
Clone the repo
git clone --depth 1 https://github.com/terrylica/cc-skills

Made for: Claude Code.

Or install macro-keyboard, the plugin that ships this one along with the rest of its 4 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for diagnose-dead-global-hotkey

README.md
[![agentmods](https://agentmods.dev/badge/skills/terrylica/cc-skills/diagnose-dead-global-hotkey/github.svg)](https://agentmods.dev/skills/terrylica/cc-skills/diagnose-dead-global-hotkey)
Your own site
<a href="https://agentmods.dev/skills/terrylica/cc-skills/diagnose-dead-global-hotkey"><img src="https://agentmods.dev/badge/skills/terrylica/cc-skills/diagnose-dead-global-hotkey/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for diagnose-dead-global-hotkey

Your own site · 80×15
<a href="https://agentmods.dev/skills/terrylica/cc-skills/diagnose-dead-global-hotkey"><img src="https://agentmods.dev/badge/skills/terrylica/cc-skills/diagnose-dead-global-hotkey.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 195 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,405 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00195 $0.02405
Opus 5.5 $0.00078 $0.00962
Sonnet 5.5 $0.00039 $0.00481
Haiku 4.5 $0.00019 $0.00241

Measured 11d ago against content hash 142945b10d6f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

diagnose-dead-global-hotkey scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/macro-keyboard/skills/diagnose-dead-global-hotkey/SKILL.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Diagnose a Dead Global Hotkey

Self-Evolving Skill: This skill improves through use. If instructions are wrong, an API or app option changed, or a workaround was needed: fix this file and the scripts immediately, don't defer. Only update for real, reproducible issues.

A global hotkey works everywhere except while one app is in front (or full screen, or merely running). The press either does nothing or does something inside that app instead. This skill finds where on the input path the chord is lost or changed, then fixes that layer only.

The input path (bottom to top)

keyboard ─► DriverKit remapper (Karabiner-Elements) ─► HID tap point ─► Session tap point ─► hotkey dispatch ─► frontmost app
              rewrites keys BELOW every tap            active taps here can swallow or rewrite     (Carbon RegisterEventHotKey)

tap-census.swift can also report taps at a third point, AnnotatedSession. The window server handles some shortcuts before events reach it (TigerVNC's source gives this as the reason it cannot grab the keyboard there), so a tap at that point is an unlikely culprit, and the logger does not watch it. If the four positions are all clean and the census shows an ACTIVE AnnotatedSession tap from the problem app, suspect it next.

Two facts drive the whole method:

  1. A remapper works below the tap layer. Karabiner's rules (for example a frontmost_application_if rule that turns Command into Control for a remote-desktop viewer) change the chord before any event tap, logger or hotkey sees it.
  2. A synthetic test key enters above the remapper. A CGEventPost probe can report "hotkey fires" while the physical key still fails. Never conclude from a synthetic probe alone; confirm with a real key press in the logger.

Tools (in scripts/, run with swift <file>, no build step)

Resolve the directory first: S="$(cc-plugin-root macro-keyboard)/skills/diagnose-dead-global-hotkey/scripts".

Script What it does
tap-census.swift Lists every keyboard event tap: owner, HID or Session point, ACTIVE (can swallow) or listen-only. Read-only.
key-path-logger.swift Four listen-only taps (HID head/tail, Session head/tail). Logs only key-downs with Cmd, Ctrl or Opt held: modifiers, keycode, frontmost app, and whether a watched app opened a window.
hotkey-probe.swift Posts a synthetic chord at the HID tap and reports whether the watched app reacted (FIRED / DID NOT FIRE). Good for tap and window-state tests, blind to remappers.

Read the full file on GitHub · 117 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 117 lines · 195 tokens per session scan A 142945b10d6f

Subscribe to this mod's changes

diagnose-dead-global-hotkey is a skill published in the GitHub repository terrylica/cc-skills (0 stars, last pushed yesterday), licensed MIT. It adds 195 tokens to every session and 2,405 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-16.

Related

Other skills, from other repositories

monitoring-observability

OpenTelemetry, structured logging, distributed tracing, alerting, and dashboards. Use when instrumenting services, designing logs/traces/metrics, defining SLOs and alerts, or debugging production behavior from telemetry.

travisjneuman/.claude · 48 tokens

debug-systematic

Systematic 4-phase debugging methodology for complex, intermittent, or mysterious issues. Use when investigating bugs, race conditions, or unexplained failures.

travisjneuman/.claude · 33 tokens

thinking-scientific-method

When a symptom has several plausible causes, rank falsifiable hypotheses and run the cheapest discriminating observation first; prefer least-assumptive survivors only after evidence fit.

tjboudreaux/cc-thinking-skills · 38 tokens

thinking-five-whys-plus

When a fault is localized and the proximate cause is known but the systemic root is not, chain evidence-linked whys with a counterfactual stop and a countermeasure.

tjboudreaux/cc-thinking-skills · 41 tokens

thinking-map-territory

When a claim, doc, test, metric, or assumption conflicts with observed behavior, stop theorizing from the map and verify the live code or data; let territory overrule.

tjboudreaux/cc-thinking-skills · 42 tokens

windows-ops

Comprehensive Windows workstation operations - diagnose slow boot, failing drives, BSOD crashes, startup bloat, runaway processes, event logs. Use for: Windows is slow, slow bootup, won't boot, blue screen, BSOD, kernel crash, drive failing, SMART errors, disk errors, Event 41, Event 129, storahci reset, BugCheck…

0xDarkMatter/claude-mods · 233 tokens