# Pty Capture

> Background knowledge for droid-control workflows -- not invoked directly. Capture ground-truth byte sequences from real terminal emulators.

- Skill: `factory-ai/pty-capture` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add factory-ai/pty-capture`
- Raw SKILL.md: https://api.skillmd.com/api/skills/factory-ai/pty-capture/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: factory-ai (https://skillmd.com/u/factory-ai)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/factory-ai/pty-capture

---


# PTY Byte Capture

The orchestrator routed you here. Use these mechanics to execute your plan.

Capture the exact bytes a real terminal emits for a given keystroke. Use this when the question is "what sequence does terminal X send for key Y?" rather than "does the UI look right?"

## Platform support

| Platform | Status | Read |
|---|---|---|
| Linux / Wayland | Implemented | [platforms/linux.md](platforms/linux.md) |
| Windows (KVM) | Implemented | [platforms/windows.md](platforms/windows.md) |
| macOS (QEMU) | Implemented | [platforms/macos.md](platforms/macos.md) |

**Read the platform file for your target OS.** Each contains the capture architecture, prerequisites, usage pattern, and platform-specific notes.

## Known dead ends

- **Xvfb + xdotool**: bypasses real keyboard processing entirely
- **uinput + Xvfb**: Xvfb does not consume kernel input devices
- **SSH PTY for keystroke injection**: distorts the input encoding; SSH is only for output capture or deployment

## Follow-on

Feed captured bytes into terminal compatibility fixtures and replay tests in `apps/cli`.

