Skip to main content

Python Gamepad

Project description


PyPad2

PyPad2 is simple and easy to use wrapper around evdev to read gamepad input from PS4 controller

License:

License

Python & Pypi:

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 details)

Uploaded Source

File details

Details for the file pypad2-2.0.1.tar.gz.

File metadata

  • Download URL: pypad2-2.0.1.tar.gz
  • Upload date:
  • Size: 15.6 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

Hashes for pypad2-2.0.1.tar.gz
Algorithm Hash digest
SHA256 93014f552c05c3da7323c30e1473907369cce522f41d6d3525c504ad3b688631
MD5 32112720b152fe5ccd5b5422f83aedb1
BLAKE2b-256 d2de4bd3816bd2048f42b9f4912b23d2f6a2b6656700288c40004044bbc9183a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page