Skip to main content

Type text and emojis character-by-character using clipboard paste.

Project description

Pacetype 🐢

PyPI version License: MIT

Type text and emojis character-by-character with adjustable delays. A workaround for libraries like PyAutoGUI that struggle with direct emoji input.

🤔 Why Pacetype?

Libraries like pyautogui are fantastic for automating keyboard input, but they often fail when trying to type emojis or complex Unicode characters directly. This is because they simulate low-level key presses, which don't always map correctly to these characters across different operating systems and input methods.

pacetype takes a different approach:

  1. It copies one character (including emojis) at a time to the system clipboard.
  2. It simulates the "paste" keyboard shortcut (Ctrl+V or Cmd+V).
  3. It waits for a specified interval before processing the next character.

This method is generally more reliable for handling a wider range of characters, especially emojis.

🚀 Installation

pip install pacetype

✨ Usage

import pacetype
import time

# Give yourself a few seconds to switch to the target window
print("Switch to your text editor or chat window in 5 seconds...")
time.sleep(5)

text_to_type = "Hello World! 👋 Typing emojis like 🚀 and ✨ is easy!"
pacetype.typewrite(text_to_type, interval=0.15) # 0.15 seconds between characters

print("\nTyping finished!")

⚙️ Features

  • Emoji Support: Reliably types emojis and complex Unicode characters.
  • Adjustable Delay: Control the typing speed with the interval parameter.
  • Simple API: A single typewrite function makes it easy to use.
  • Cross-Platform (Goal): Aims to work on Windows, macOS, and Linux (relies on pyperclip and pyautogui's cross-platform capabilities).

⚠️ Important Notes

  • Focus: The script requires the target window (e.g., text editor, browser) to have focus when pacetype.typewrite() is running. Make sure you switch to the correct window after starting the script.
  • Clipboard Interference: This script heavily uses the clipboard. Anything you copy manually while it's running will be overwritten. The content of the clipboard after the script finishes will be the last character typed.
  • Keyboard Shortcuts: Relies on standard Ctrl+V (Windows/Linux) or Cmd+V (macOS) paste shortcuts. If these are remapped on your system, it might not work.

🤝 Contributing

Contributions, issues, and feature requests are welcome!

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pacetype-0.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pacetype-0.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file pacetype-0.1.0.tar.gz.

File metadata

  • Download URL: pacetype-0.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for pacetype-0.1.0.tar.gz
Algorithm Hash digest
SHA256 43968810b6fe13a0f008fdbb85c028c82fc5a27da4a485060735227036ffcb12
MD5 e2f59215cbf0de34fe69d5e1d34f0460
BLAKE2b-256 09919e511324cd99c3c714614bb72730c6310f6bb4a8cc88e40cb481124e02f1

See more details on using hashes here.

File details

Details for the file pacetype-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pacetype-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for pacetype-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f0c0ef5b650de600c1fd051b27d412c0103fc944bba58ff8a7bc7569e2dcda1
MD5 6a96e4f12bfb9a36c622871089ba662e
BLAKE2b-256 a9355969a03a15c5c7dfb261e6707e3c2e822b8f985109b5eb03d49617c1a22c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page