GhostType is a native macOS application for sending text and commands to other apps. Hardware key injection works without the clipboard; Exact Paste and Smart Editor modes support code editors that transform keystrokes. The GitHub repository was renamed from KeyInjector to GhostType; its earlier releases remain available.
- Countdown-Based Injection: Click "Inject", then use the countdown to switch focus to your target window.
- Five Injection Modes:
- Base64 One-Liner: Encodes source as UTF-8 and writes it with
printfand Base64 decoding. The destination path is shell-quoted. - Terminal Heredoc: Writes through a quoted here-document with a delimiter selected to avoid collisions with source lines.
- Direct Typing: Sends clipboard-free keyboard events. Hardware key mapping assumes a US ANSI layout. Code editors may transform Enter, Tab, or punctuation through their editor behaviors.
- Smart Editor (Anti-Bracket): For an empty Monaco or VS Code editor with auto-pairing enabled, types the source character-by-character, waits for and deletes generated closers after
{,(,[,", and', then clears editor-generated indentation before reproducing the source line's own indentation. - Exact Paste: Places the text on the macOS clipboard briefly, pastes it once, and restores the previous clipboard if it hasn't changed.
- Base64 One-Liner: Encodes source as UTF-8 and writes it with
- Key Interval Control: Set the minimum time between key starts from 8ms to 100ms. Event hold time is included; a VM / remote option uses longer holds.
- Live Payload Preview: See the payload before starting.
- Emergency Cancel: Stop typing from the app at any time.
Terminal modes type commands into the focused terminal. Review the target path and payload preview before starting. The generated command treats source text as data; paths containing line breaks or control characters are rejected. Exact Paste temporarily uses the system clipboard; it avoids per-character editor behavior but relies on the target editor accepting paste.
- Download GhostType-v1.3.0-macos-arm64.zip.
- Unzip and drag
GhostType.appinto/Applications. - Launch
GhostTypeand grant Accessibility permissions when prompted.
Previous GhostType v1.2.0, GhostType v1.1.1, GhostType v1.1.0, and original KeyInjector v1.0.0 releases remain available.
git clone https://github.com/chrollovale/GhostType.git
cd GhostType
swift build
swift run GhostType
./bundle.shThe compiled application bundle will be created at ./GhostType.app. Pass an output directory to bundle.sh to place it elsewhere.
Simulating hardware keystrokes on macOS requires Accessibility permissions:
- Go to System Settings → Privacy & Security → Accessibility.
- Ensure GhostType is enabled in the list.
- The app includes an active status indicator in the top right to verify permissions automatically.
If GhostType saved you time, please consider giving the project a Star!