https://github.com/djeada/type-simulator
TypeSimulator is a Python tool designed to simulate human-like typing in text editors. It's useful for demonstrations, tutorials, and testing purposes. The tool uses `pyautogui` to control keyboard inputs, allowing it to type text into virtually any text editor or text input field.
https://github.com/djeada/type-simulator
Last synced: 10 months ago
JSON representation
TypeSimulator is a Python tool designed to simulate human-like typing in text editors. It's useful for demonstrations, tutorials, and testing purposes. The tool uses `pyautogui` to control keyboard inputs, allowing it to type text into virtually any text editor or text input field.
- Host: GitHub
- URL: https://github.com/djeada/type-simulator
- Owner: djeada
- License: mit
- Created: 2024-03-02T18:17:00.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-10T21:24:03.000Z (almost 2 years ago)
- Last Synced: 2025-02-05T11:51:52.145Z (11 months ago)
- Language: Python
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Type-Simulator
TypeSimulator is a Python tool designed to simulate human-like typing in text editors. It's useful for demonstrations, tutorials, and testing purposes. The tool uses `pyautogui` to control keyboard inputs, allowing it to type text into virtually any text editor or text input field.
## Features
- Simulate human-like typing with configurable speed and variance.
- Open a text editor or application before typing via a script.
- Type text provided directly via command line or from a text file.
- Handle special keys and sequences for more complex typing simulations.
## Usage
TypeSimulator can be run from the command line. There are several options available:
- `-e/--editor_script`: Path to a script to open the text editor or application.
- `-f/--file`: Path to a text file whose contents will be typed.
- `-s/--speed`: Typing speed in seconds per character. Default is 0.15 seconds.
- `-v/--variance`: Variance in typing speed to simulate natural typing. Default is 0.05 seconds.
- `text`: Direct text input to type.
### Example
To type the contents of a file with a custom typing speed:
```
python type_simulator.py -f path/to/file.txt -s 0.1 -v 0.02
```

To type a direct text input:
```
python type_simulator.py 'echo "Hello, this is TypeSimulator!" > temp.txt'
```

## Customizing TypeSimulator
You can extend the functionality of TypeSimulator by editing the script. For example, you can add more special keys and sequences to the `_get_special_keys` method.
## License
This project is open-source and available under the [MIT License](https://opensource.org/licenses/MIT).
## Contributions
Contributions to this project are welcome. Please fork the repository and submit a pull request with your changes.