--- id: pydirectinput version: "1.0.4" license: unclear license_treatment: permissive maintenance: abandoned --- # PyDirectInput — Python mouse and keyboard input automation for Windows using Direct Input. License: permissive · Maintenance: abandoned · Downloads: 108.6K/mo ## What it is and what it does PyDirectInput provides mouse and keyboard input automation for Windows by using DirectInput scan codes and the SendInput() win32 function instead of the older Virtual Key Codes and deprecated mouse_event()/keybd_event() functions. This makes it suitable for automating input in applications that rely on DirectX, such as video games, where PyAutoGUI often fails. The package is designed as a drop-in replacement for PyAutoGUI's input functions—you can use both libraries together, substituting PyDirectInput only where PyAutoGUI doesn't work. The library implements core input functions like moveTo(), click(), press(), keyDown(), keyUp(), and write(), but omits some PyAutoGUI features like scroll, drag, and hotkey functions. It has no external runtime dependencies and installs with low friction, but the project is abandoned: the last release was in February 2021 and the last commit in July 2023, so no maintenance or updates should be expected. Use it for: - Automate mouse and keyboard input in video games or DirectX applications where PyAutoGUI fails to register inputs. - Create bots or automation scripts for Windows games that require direct input simulation rather than virtual key codes. - Test game UI or input handling by programmatically simulating player mouse clicks and key presses. - Build automation tools for Windows applications that ignore standard input APIs and require DirectInput. - Supplement PyAutoGUI with DirectInput-based input for specific applications while keeping PyAutoGUI for other tasks. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Automates mouse and keyboard input on Windows using DirectInput scan codes and SendInput(), providing an alternative to PyAutoGUI that works in DirectX applications like video games. Yes, but with caution. Install if you need DirectInput-based input automation for a Windows game or DirectX application where PyAutoGUI doesn't work, and you are comfortable maintaining the code yourself. The permissive MIT license and low install friction are positives. However, the abandoned status (no releases since 2021, last commit 2023) means no bug fixes, security updates, or compatibility work—you are on your own if issues arise with newer Windows or Python versions. ## Install pip install pydirectinput uv add pydirectinput poetry add pydirectinput ## Installing PyDirectInput Before you install: Low install friction with no runtime dependencies. However, the package is abandoned—last release was 2021-02-02 and last commit 2023-07-04—so expect no maintenance, bug fixes, or compatibility updates for modern Python or Windows versions. License in practice: MIT license (permissive) means you can use, modify, and distribute the package freely with minimal restrictions, though you must include the license notice. Quickstart: pip install pydirectinput import pydirectinput pydirectinput.moveTo(100, 150) pydirectinput.click() pydirectinput.press('esc') Windows only; requires Python 3.4 or later. DirectInput and SendInput are Windows-specific APIs, so this package will not work on macOS or Linux. Verify before relying: - Whether the package works reliably with current Windows versions and modern Python 3.x releases, given the 2021 release date and 2023 last commit. - Compatibility with recent DirectX versions and whether DirectInput scan codes remain stable across Windows updates. - Whether pull requests are actually accepted and reviewed, despite the abandoned maintenance status. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 108.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags windows mouse keyboard automation, directinput input simulation, game input automation windows, sendinput keyboard mouse control, directx-compatible input automation, windows input automation directinput, game controller input windows, windows-automation, game-input, directinput [View on SkillFed](https://skillfed.io/packages/pydirectinput) · [View on PyPI](https://pypi.org/project/pydirectinput/)