A simple Flask-based API that simulates keyboard and mouse inputs to control a Windows game window remotely.
- Programmatically sends keypresses and mouse clicks to a game window
- REST API interface for automation or remote control
- Supports both single key presses and toggle (hold/release) behavior
- Automatically focuses the game window before sending input
This is from a personal project and is tweaked depending on the game i'm messing with at the time.
It's a great starting point and reference, not expected to handle every use case, but not hard to update and tweak as needed.
- Windows OS
- Python 3.8+
- The following Python packages:
Flaskpywin32pynput
pip install Flask pywin32 pynputpython ./input_server.py