Type text and emojis character-by-character using clipboard paste.
Project description
Pacetype 🐢
Simulates typing text and emojis character-by-character with adjustable delays. Uses the clipboard for robust cross-platform compatibility, especially for special characters and emojis that often cause issues with direct key simulation.
🤔 Why Pacetype?
Automating keyboard input with libraries like pyautogui can be tricky when dealing with emojis or complex Unicode characters. Direct key simulation doesn't always map correctly across different OSs and input methods.
pacetype simplifies this by:
- Copying one character (including emojis) at a time to the system clipboard.
- Simulating the standard "paste" keyboard shortcut (Ctrl+V or Cmd+V).
- Waiting for a specified interval (if provided) before the next character.
This clipboard-based method ensures greater reliability for a wide range of characters.
🚀 Installation
pip install pacetype
✨ Simple Usage
Using pacetype is straightforward. Just import it and call it directly with the text you want to type.
import pacetype
import time
# Give yourself a moment to switch to the target window
print("Pacetyping in 3 seconds...")
time.sleep(3)
# Type text with the default delay (~0.1 seconds between characters)
pacetype("Hello World! 👋")
# Type text with a custom delay (0.5 seconds between characters)
pacetype("Typing slowly... 🐢", interval=0.5)
# Pacetype inherently has a small delay due to the copy/paste mechanism,
# even if interval is 0.0.
pacetype("Fast typing!", interval=0.0)
print("Typing finished!")
Key Points:
- Default Delay: By default, pacetype uses a
0.05second delay between characters (pacetype("text")is equivalent topacetype("text", interval=0.05)). This is defined inpacetype/__init__.py. - Inherent Delay: Even if you set
interval=0.0, there will always be a small, system-dependent delay between characters due to the time it takes to perform the clipboard copy and paste operations. There is no artificialtime.sleep(0.01)added when the interval is 0.
⚙️ Features
- Emoji & Unicode Support: Reliably types emojis and complex characters via the clipboard.
- Adjustable Delay: Control typing speed with the optional
intervalargument. - Simple Callable API: Just
import pacetypeand usepacetype("your text", interval=...). - Cross-Platform: Works on Windows, macOS, and Linux (thanks to
pyperclipandpyautogui).
⚠️ Important Notes
- Window Focus: The target application window (e.g., text editor, browser, chat) must have keyboard focus when
pacetype()is executing. - Clipboard Use: Pacetype relies heavily on the system clipboard. Any content you manually copy while it's running will be overwritten. The clipboard will contain the last character typed after the script finishes.
- Keyboard Shortcuts: Assumes standard
Ctrl+V(Windows/Linux) orCmd+V(macOS) paste shortcuts are active.
🤝 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.2.0.tar.gz.
File metadata
- Download URL: pacetype-0.2.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74e7971e080e638e0ea91fefc675c6cd919135e07d9d6c4ad05a670027da2641
|
|
| MD5 |
630b73f969bce42529df17349ac6cccb
|
|
| BLAKE2b-256 |
c304c2570ab2337279eb7ade0707c9212cd8f5170c946ca9d21fdcb166c15b8d
|
File details
Details for the file pacetype-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pacetype-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.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 |
592560f7d289998d86e58b62139abc114c4b7819b447a88a910f0e3b82b5e733
|
|
| MD5 |
ae4078030bd2d6fb4326b6e75989ed2f
|
|
| BLAKE2b-256 |
ea6b3fa4928b7b0512a15b8fe0aab7c950f6fbcc24d257ddc6e1e306965cbe7a
|