Type text and emojis character-by-character using clipboard paste.
Project description
Pacetype 🐢
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:
- It copies one character (including emojis) at a time to the system clipboard.
- It simulates the "paste" keyboard shortcut (Ctrl+V or Cmd+V).
- 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
intervalparameter. - Simple API: A single
typewritefunction makes it easy to use. - Cross-Platform (Goal): Aims to work on Windows, macOS, and Linux (relies on
pyperclipandpyautogui'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) orCmd+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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43968810b6fe13a0f008fdbb85c028c82fc5a27da4a485060735227036ffcb12
|
|
| MD5 |
e2f59215cbf0de34fe69d5e1d34f0460
|
|
| BLAKE2b-256 |
09919e511324cd99c3c714614bb72730c6310f6bb4a8cc88e40cb481124e02f1
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f0c0ef5b650de600c1fd051b27d412c0103fc944bba58ff8a7bc7569e2dcda1
|
|
| MD5 |
6a96e4f12bfb9a36c622871089ba662e
|
|
| BLAKE2b-256 |
a9355969a03a15c5c7dfb261e6707e3c2e822b8f985109b5eb03d49617c1a22c
|