Python Gamepad
Project description
PyPad2
PyPad2
is simple and easy to use wrapper around evdev
to read gamepad input from PS4 controller
License:
Python & Pypi:
Install & Upgrade:
# install via pypi
pip3 install pypad2
# upgrade
pip3 install --upgrade pypad2
Import:
from pypad2 import Gamepad, Keymap
Usage:
Examples:
from src.pypad2 import Gamepad, Keymap
# create instance
gamepad = Gamepad(path='/dev/input/event2')
while True:
buttons = gamepad.pressed()
for button in buttons:
print(f'{button.name}: {buttons[button]}')
Author:
👨🏼💻 Vinzenz Weist
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pypad2-2.0.1.tar.gz
(15.6 kB
view hashes)