pypad2 is a lightweight evdev bridge to handle ps4 gamepad input
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 pypad2 import Gamepad, Keymap
# create instance
gamepad = Gamepad(path='/dev/input/event2')
# get gamepad's name
name = gamepad.name()
print(name)
# get gamepad's status
status = gamepad.status()
print(status) # print's: {'capacity': '100', 'status': 'Discharging'}
# set gamepad's color
gamepad.color()
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.5.0.tar.gz
(15.8 kB
view details)
File details
Details for the file pypad2-2.5.0.tar.gz.
File metadata
- Download URL: pypad2-2.5.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67fb9fb1281efef829962dbea9a41d2d0f28850e638e39cde25ff034420862ff
|
|
| MD5 |
b57b51230994c36237b9ef876e1fb527
|
|
| BLAKE2b-256 |
20510508d80c4ba5002262ecdecaca463163995b8571bd78de500e5088ed4765
|