pty-capture

Capture exact terminal emulator byte sequences for keystrokes across Linux, Windows, and macOS.

Updated Jul 13, 2026
One-click install
npx skills add https://github.com/ElbertePlinio/dotfiles --skill pty-capture-elberteplinio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pty-capture
Source: https://github.com/ElbertePlinio/dotfiles/tree/main/private_dot_factory/plugins/marketplaces/factory-plugins/plugins/droid-control/skills/pty-capture
Command: npx skills add https://github.com/ElbertePlinio/dotfiles --skill pty-capture-elberteplinio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the critical problem of determining the exact byte sequences that real terminal emulators emit for specific keystrokes, eliminating unreliable guesswork from emulated input paths or distorted encoding that leads to incorrect terminal compatibility and input handling bugs.

Core Features & Use Cases

  • Multi-Platform Ground-Truth Capture: Provides platform-specific workflows for Linux/Wayland, Windows (KVM), and macOS (QEMU) to capture lossless byte output from real terminal emulators like Ghostty, Kitty, Alacritty, and Terminal.app.
  • Avoids Common Capture Dead Ends: Explicitly documents and avoids unreliable methods like Xvfb + xdotool, uinput + Xvfb, and SSH PTY keystroke injection that bypass real keyboard processing or distort input encoding.
  • Use Case: For example, when developing a terminal emulator or a CLI tool that needs to handle special key combos like Shift+Enter or Ctrl+L correctly, use this skill to capture the exact byte sequences from target terminals to build accurate compatibility fixtures and replay tests.

Quick Start

Use the pty-capture skill to capture the exact byte sequence emitted by the Ghostty terminal when the Shift+Enter key combo is pressed on a Linux/Wayland system.

Frequently Asked Questions about pty-capture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I capture exact terminal keystroke bytes for CLI input testing?

To capture exact terminal keystroke bytes for CLI input testing, you can use platform-specific workflows on Linux/Wayland, Windows KVM, or macOS QEMU to record lossless byte sequences directly from real terminal emulators, preserving modifier states without distortion.

Why does SSH PTY keystroke injection distort terminal input encoding?

SSH PTY keystroke injection distorts terminal input encoding because it bypasses the real keyboard processing logic of the target terminal emulator, altering the raw byte sequences and leading to incorrect compatibility testing results.

Can I use Xvfb and xdotool to capture keystrokes for terminal compatibility testing?

You should not use Xvfb and xdotool to capture keystrokes for terminal compatibility testing because these methods bypass real keyboard processing and fail to preserve accurate modifier states, leading to unreliable and distorted input data.

What is the best way to build accurate terminal input replay fixtures across different platforms?

The best way to build accurate terminal input replay fixtures is to capture ground-truth byte sequences from real terminal emulators like Ghostty or Kitty using lossless, platform-specific capture methods that preserve exact modifier key states.

Does terminal capture support Linux Wayland, Windows KVM, and macOS QEMU environments?

Yes, terminal capture supports Linux Wayland, Windows KVM, and macOS QEMU environments by providing platform-specific workflows to capture exact ground-truth byte sequences emitted by real terminal emulators across these distinct operating systems.

How do I validate CLI tool input handling for special key combinations like Shift+Enter?

To validate CLI tool input handling for special key combinations like Shift+Enter, capture the exact byte sequences emitted by your target terminal emulator and use those lossless ground-truth bytes to build accurate compatibility tests.