# github/hotkey

Trigger an action on an element with a keyboard shortcut.

Repository: https://github.com/github/hotkey
Canonical: https://ross.abutalabs.com/products/hotkey
Homepage: https://github.github.com/hotkey/
Language: JavaScript
License: MIT
License Family: permissive
Topics: decorator, shortcuts
Last push: 2026-06-03T14:14:03+00:00

## Health v2 (maintenance only)
Score: 84/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 85, release rhythm 75, longevity 100
- inputs: {"age_days": 2785, "days_push": 91, "days_rel": 170, "gap_med": 0.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3297, forks 100 (observed 2026-08-28T04:07:55.645395+00:00)

## What it is
A small JavaScript library from GitHub that triggers actions on elements via keyboard shortcuts declared in data-hotkey attributes. It supports single keys, key sequences, and modifier combos, and is used across GitHub's own UI.

## Use cases
- add keyboard shortcuts to focus a search input
- trigger a button click with a key combo like Meta+k
- bind 'g i' style key sequences for navigation
- scope shortcuts to a specific form field
- declare shortcuts in server-rendered HTML templates

## When to choose
- you want declarative, HTML-attribute-based keyboard shortcuts
- you need key sequences and cross-platform modifier handling
- you want a tiny dependency maintained by GitHub

## When to avoid
- you need complex shortcut management like chord recording or cheat-sheet UIs
- you're building a non-DOM environment such as a terminal or native app

## Facets
- artifact type: library
- maturity: stable
- function: ui-components, developer-tools
- domain: web-development, frontend, developer-tools
- platform: browser
- tags: keyboard-shortcuts, hotkeys, data-attributes, accessibility, javascript

## Member repositories
- github/hotkey (main) score 84

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:55.645395+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-29T18:42:57.862237+00:00, confidence not recorded.
  - readme: https://github.com/github/hotkey (fetched 2026-08-28T04:07:55.645395+00:00, sha 154fe402c0d0)
  - homepage: https://github.github.com/hotkey/ (fetched 2026-08-29T09:35:42.407980+00:00, sha dce525415a5f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
