Skip to content

v0.6.0

Choose a tag to compare

@changkun changkun released this 06 Jun 16:20
· 1 commit to main since this release
f614750

This release changes how hotkeys work on macOS. Linux and Windows are unaffected.

⚠️ macOS: Accessibility permission is now required for all hotkeys

macOS hotkeys are now delivered through a CGEventTap instead of Carbon RegisterEventHotKey — a single mechanism now serves both regular and media keys, and the tap can consume the event so it does not also reach the focused app. (#46, closes #45)

As a result, every macOS hotkey now requires the application to be trusted for Accessibility (Input Monitoring) — previously only media keys (added in v0.5.0) needed it, and regular hotkeys needed no permission at all.

  • Grant permission in System Settings → Privacy & Security → Accessibility.
  • Without it, Register() returns an error (it does not crash or silently no-op).
  • Sandboxed apps may be unable to use global hotkeys under this model.

🔒 Privacy note

To deliver hotkeys this way, the package now installs a global keyboard event tap. By construction such a tap can observe keyboard events system-wide; this package uses it only to match the specific key combinations you register and forward their press/release — it does not store, log, or transmit anything. The Accessibility permission prompt the OS shows reflects this capability. If you ship an application built on this package, mention the Accessibility requirement to your users.

Notes

  • If you only need media keys, or you want the previous permission-free behavior for regular hotkeys on macOS, stay on v0.5.0 (Carbon for regular hotkeys + a tap for media keys).
  • Docs (package doc + README) now describe the macOS Accessibility requirement.

Full changelog: v0.5.0...v0.6.0