Skip to content

feat(macos): system-wide hotkeys for capture/pause/overlay#3

Merged
PCcoding666 merged 1 commit into
masterfrom
feat/global-hotkeys
Jun 16, 2026
Merged

feat(macos): system-wide hotkeys for capture/pause/overlay#3
PCcoding666 merged 1 commit into
masterfrom
feat/global-hotkeys

Conversation

@PCcoding666

Copy link
Copy Markdown
Owner

What

System-wide hotkeys so LCT can be controlled while another app is frontmost — the core use case (captioning a video you're watching). The existing ⌘Space/⌘P only work when LCT itself is focused.

Chord Action
⌃⌥⌘ S start / stop capture
⌃⌥⌘ P pause / resume
⌃⌥⌘ O toggle overlay

How

  • GlobalHotKeyManager uses Carbon RegisterEventHotKeyno Accessibility permission needed (unlike NSEvent global monitors, which observe all keystrokes)
  • The C event handler only posts the existing .toggleCapture / .togglePause / .toggleOverlay Notifications, reusing the menu/command observers — zero view-model coupling
  • Chords use ⌃⌥⌘ to avoid clashing with system shortcuts like ⌘Space

Verified

  • Strict-concurrency build clean (matters for the swift 6.0 CI)
  • 123 tests pass; app launches; all three hotkeys register without error
  • ⚠️ Actual chord triggering needs manual testing on device (can't simulate global key presses here)

🤖 Generated with Claude Code

Adds GlobalHotKeyManager using Carbon RegisterEventHotKey to control LCT
while another app is frontmost (the core use case — captioning a video
you're watching). The in-app ⌘Space/⌘P shortcuts only work when LCT is
focused.

Default chords (control-option-command, chosen to avoid system clashes):
  ⌃⌥⌘ S — start/stop    ⌃⌥⌘ P — pause/resume    ⌃⌥⌘ O — toggle overlay

Carbon hotkeys need no Accessibility permission (unlike NSEvent global
monitors). The C handler only posts the existing Notifications, reusing
the menu/command observers with zero view-model coupling.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@PCcoding666 PCcoding666 merged commit 8bea027 into master Jun 16, 2026
2 checks passed
@PCcoding666 PCcoding666 deleted the feat/global-hotkeys branch June 16, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant