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.0.tar.gz (15.6 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: pypad2-2.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 378105f749be63ddba4ccec7f94f8c53ecba477bedbfa6282b4adf0492a97bb8
MD5 056ec0bbdcd60bf6f20d0b9759ae345a
BLAKE2b-256 3d23d85b0c105cd5494407da8e40c2a843d068c64b690f42a67f51fb29fba776

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