Cross-platform Python library for reading input events from keyboards, mice, and gamepads. Version 0.5 provides a consistent API across Windows, Linux, and macOS via raw device access. Release cadence is low; last updated 2020.
pip install inputsVerified import paths — ran on the pinned version, not inferred.
Poll gamepad events in a loop. On Linux, ensure user has read permissions on /dev/input/event*.
sudo usermod -aG input $USER && log out and back in
Add a small sleep inside the loop, e.g., time.sleep(0.1)
Migrate to pynput (pip install pynput) for cross-platform input control.
Go to System Preferences > Security & Privacy > Privacy > Accessibility and add your terminal app.
Use 'from inputs import get_gamepad' (note: 'gamepad' not 'gamepad'). Check pip show inputs version >= 0.4.
Run script with sudo or add user to 'input' group: sudo usermod -aG input $USER and re-login.
Ensure the device is connected and recognized (ls /dev/input/ on Linux). On Windows, install drivers if needed.