macos-input-injection
Installation
SKILL.md
macOS input injection for agents
For an AI agent that posts keystrokes, taps events, or runs child processes on macOS.
1. Event-Tap Location Decides Visibility
macOS has two post locations:
kCGHIDEventTap(HID) — at the top of the event stream. KVMs and capture taps that sit at HID see these events.kCGSessionEventTap(session) — injected downstream. HID taps do not see them.
Deskflow captures at HID. Therefore:
CGEvent.post(tap: .cghidEventTap)is forwarded to the KVM client.CGEvent.post(tap: .cgSessionEventTap)lands on the local Mac only.
Two common tools use the session tap: