inputs
Cross-platform Python support for keyboards, mice and gamepads.
What it is and what it does
Inputs is a library that lets your Python program listen for and capture keyboard, mouse, and gamepad events across Linux, Windows, and macOS. It abstracts away the platform-specific details of reading hardware input, so you can write input-handling code once and run it on multiple operating systems. The library has no runtime dependencies, making it lightweight to install and use.
The package is designed for straightforward use: import the devices module and start listening for input events. It supports Python 2.7 and all Python 3 versions, though development has been inactive since 2018. The library is useful for building games, interactive tools, or any application that needs to respond to keyboard, mouse, or gamepad input without relying on a GUI framework.
Use it for:
- Build a simple game or interactive application that responds to keyboard and gamepad input on multiple platforms
- Create a Raspberry Pi or embedded system project that listens for user input from connected peripherals
- Capture raw hardware input events for accessibility tools or input remapping utilities
- Develop a command-line tool that responds to mouse or gamepad events without a GUI framework
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides cross-platform Python access to keyboard, mouse, and gamepad input on Linux, Windows, and macOS.
Yes, if you need cross-platform hardware input capture without GUI framework dependencies and can accept that the package is no longer actively maintained. The lack of recent updates means it may have compatibility issues with very recent OS versions or Python releases, so test thoroughly in your target environment before relying on it for production use.
Install
inputs on PyPI
pip
pip install inputsuv
uv add inputspoetry
poetry add inputsInstalling inputs
Before you install
Low install friction with no runtime dependencies. Maintenance is aging—last release was 2018-10-05 and the last commit 2025-05-26, so the package is not actively developed but remains available and functional.
License in practice
BSD license is permissive, allowing use in commercial and private projects with minimal restrictions.
Quickstart
pip install inputs
from inputs import devices
# Listen for input events
for event in devices.get_gamepad():
print(event)
Platform-specific input drivers must be available on the target OS; on Linux, may require udev rules or permissions to access input devices.
Verify before relying
- Whether the package works reliably with modern Python 3 versions beyond what was tested at release time
- Current state of platform-specific input handling on recent OS versions (Windows 11, macOS 14+, modern Linux distributions)
- Whether gamepad support covers modern controllers and protocols
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 2,870 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 81,355/month — #14,234 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: inputs-0.5-py2.py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
evdevProvides Python bindings to Linux's evdev and…
permissive · top 5,000 on PyPI
pynputPynput lets you programmatically control and…
copyleft · top 5,000 on PyPI
pynput-robocorp-forkControls and monitors mouse and keyboard input…
copyleft · top 15,000 on PyPI
keyboardHook global keyboard events, register hotkeys,…
permissive · top 5,000 on PyPI
PyAutoGUIPyAutoGUI programmatically controls the mouse…
permissive · top 5,000 on PyPI
sshkeyboardCaptures keyboard input via callbacks in SSH…
permissive · top 15,000 on PyPI
PyDirectInputAutomates mouse and keyboard input on Windows…
permissive · top 15,000 on PyPI
hidProvides Python bindings to the hidapi library…
permissive · top 15,000 on PyPI
pyobjc-framework-GameControllerProvides Python bindings to macOS's…
permissive · top 15,000 on PyPI
ipyeventsipyevents provides a Jupyter widget that…
permissive · top 15,000 on PyPI