evdev
Bindings to the Linux input handling subsystem
Decision gist · record as of 2026-08-14
Yes, if you need direct access to Linux input events and can meet the build requirements. The package is stable, actively maintained, and has no known vulnerabilities. The high install friction (requires kernel headers and compilation) is a real constraint—verify your build environment is ready before attempting installation. Not suitable for cross-platform projects or systems without Linux development tools.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Linux with kernel headers and a build toolchain; must run on Linux (not macOS or Windows); typically requires root or appropriate /dev/input permissions to access input devices.
- Installation requires compilation against Linux kernel headers; the package is actively maintained with a recent commit history, but the high install friction means you'll need a build environment and Linux development packages present.
License · maintenance · safety
BSD-3-Clause (permissive) — BSD-3-Clause is permissive and poses no restrictions on commercial or proprietary use; you may use, modify, and distribute this package freely provided you retain the license notice.
last release 2026-02-05 (190 days) · last repo commit 2026-08-10 · 386 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,132,147 downloads/mo, #4,317 on PyPI
Alternatives
Verify before relying
pip install evdev
from evdev import InputDevice, list_devices
devices = list_devices()
device = InputDevice(devices[0])
for event in device.read_loop():
print(event)- Whether the package supports modern input protocols beyond basic evdev (e.g., multi-touch, force feedback details).
- Performance characteristics when handling high-frequency input streams or many simultaneous devices.
What it is and what it does
evdev is a Python library that exposes the Linux kernel's input event subsystem to userspace programs. It provides two main capabilities: reading raw hardware input events (keyboard, mouse, joystick, touchscreen) from character devices in /dev/input/, and creating virtual input devices via uinput that can inject synthesized events back into the input subsystem. The package wraps the low-level C interfaces with Python bindings, eliminating the need to call ioctl directly.
Typical use cases include building custom input handlers, remapping hardware inputs, creating input event monitors, automating user input for testing, or building virtual device drivers. The package has no runtime dependencies but requires Linux and compilation against kernel headers at install time. It supports current Python versions (3.9+) and is marked as production-stable.
Use it for
- Monitor keyboard and mouse events in real time for accessibility tools or input logging.
- Create virtual input devices to inject synthetic keyboard or mouse events for automation or testing.
- Build custom input remapping or filtering layers for gaming or accessibility use cases.
- Capture raw joystick or gamepad events for custom game controllers or input devices.
- Implement input event recording and playback for testing or demonstration purposes.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need direct access to Linux input events and can meet the build requirements.
The package is stable, actively maintained, and has no known vulnerabilities. The high install friction (requires kernel headers and compilation) is a real constraint—verify your build environment is ready before attempting installation. Not suitable for cross-platform projects or systems without Linux development tools.
Install
evdev on PyPI
Before you install
Installation requires compilation against Linux kernel headers; the package is actively maintained with a recent commit history, but the high install friction means you'll need a build environment and Linux development packages present.
Requires Linux with kernel headers and a build toolchain; must run on Linux (not macOS or Windows); typically requires root or appropriate /dev/input permissions to access input devices.
License in practice
BSD-3-Clause is permissive and poses no restrictions on commercial or proprietary use; you may use, modify, and distribute this package freely provided you retain the license notice.
Quickstart
pip install evdev
from evdev import InputDevice, list_devices
devices = list_devices()
device = InputDevice(devices[0])
for event in device.read_loop():
print(event)
Verify before relying
- Whether the package supports modern input protocols beyond basic evdev (e.g., multi-touch, force feedback details).
- Performance characteristics when handling high-frequency input streams or many simultaneous devices.
Package facts
| License | BSD-3-Clause permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Actively maintained 190 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,132,147 / month, #4,317 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Libraries |
Evidence: evdev-1.9.3.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “linux input event handling”
- evdevProvides Python bindings to Linux's evdev and uinput input event…
- keyboardHook global keyboard events, register hotkeys, and simulate key…
- relrel is a cross-platform asynchronous event dispatcher that selects…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also inputs · pyudev · pynput · spidev · pynput-robocorp-fork · ipyevents · sshkeyboard · keyboard · PyDirectInput · pylibiio