Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cppets

Cross-platform text expander that replaces trigger phrases with emoji or any text when you press Tab.

Author: @hayk4700 (Edgar Oganyan)

Features

  • Type a trigger like :heart and press Tab to expand it to ❤️
  • JSON configuration with custom triggers and replacements
  • Hot-reload configuration without restart
  • Windows MVP with UI Automation and low-level keyboard hook
  • macOS and Linux platform ports included

Configuration

Default config path:

  • Windows: %APPDATA%\cppets\config.json
  • macOS: ~/Library/Application Support/cppets/config.json
  • Linux: ~/.config/cppets/config.json

Example config.json:

{
  "version": 1,
  "triggerPrefix": ":",
  "expansions": {
    ":heart": "❤️",
    ":knife": "🔪",
    ":thanks": "Спасибо! 🙏"
  },
  "options": {
    "caseSensitive": true,
    "maxTriggerLength": 64,
    "consumeTab": true,
    "hotReload": true
  }
}

Build

cmake -S . -B build
cmake --build build --config Release

On Windows with Visual Studio:

cmake -S . -B build
cmake --build build --config Release

Usage

cppets
cppets --config C:\path\to\config.json
cppets --install-autostart
cppets --uninstall-autostart

Supported environments

Windows (MVP)

Works best in standard text controls:

  • Notepad
  • Microsoft Word
  • Browser input fields and textareas

Some Electron apps and games may not expose caret position via UI Automation. In those cases cppets passes Tab through unchanged.

macOS

Requires Accessibility and Input Monitoring permissions.

Linux

X11 session with AT-SPI2. Wayland support is not included in the first release.

How it works

  1. Global keyboard hook intercepts Tab
  2. UI Automation / Accessibility reads text left of the caret
  3. Longest matching trigger suffix is found in config
  4. Trigger is deleted via simulated Backspace
  5. Replacement text is injected as Unicode input

License

MIT

About

Cross-platform text expander that replaces trigger phrases with emoji or any text when you press Tab.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages