Skip to main content

No project description provided

Project description

cython_xinput

PyPI - Version PyPI - Python Version CI

Installation

pip install cython-xinput

Example

from cython_xinput import XinputButtons, XinputGamepad

xg = XinputGamepad(0)

xg.configure_deadzone(
    left_thumb=0.01,
    right_thumb=0.01,
    trigger=0.01,
)
xg.set_vibration(left=0.00, right=0.2)

while True:
    if not xg.update():
        continue

    print(xg.left_thumbstick())
    print(xg.right_trigger())
        
    buttons = xg.buttons()
    if XinputButtons.A in buttons:
        print("A")
    if XinputButtons.DPAD_UP in buttons:
        print("DPAD_UP")

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

cython_xinput-0.1.0.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distributions

cython_xinput-0.1.0-cp312-cp312-win_amd64.whl (42.5 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

cython_xinput-0.1.0-cp312-cp312-win32.whl (37.6 kB view hashes)

Uploaded CPython 3.12 Windows x86

cython_xinput-0.1.0-cp311-cp311-win_amd64.whl (42.4 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

cython_xinput-0.1.0-cp311-cp311-win32.whl (37.4 kB view hashes)

Uploaded CPython 3.11 Windows x86

cython_xinput-0.1.0-cp310-cp310-win_amd64.whl (42.3 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

cython_xinput-0.1.0-cp310-cp310-win32.whl (37.4 kB view hashes)

Uploaded CPython 3.10 Windows x86

cython_xinput-0.1.0-cp39-cp39-win_amd64.whl (43.0 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

cython_xinput-0.1.0-cp39-cp39-win32.whl (38.0 kB view hashes)

Uploaded CPython 3.9 Windows x86

cython_xinput-0.1.0-cp38-cp38-win_amd64.whl (43.1 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

cython_xinput-0.1.0-cp38-cp38-win32.whl (38.0 kB view hashes)

Uploaded CPython 3.8 Windows x86

cython_xinput-0.1.0-cp37-cp37m-win_amd64.whl (44.0 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

cython_xinput-0.1.0-cp37-cp37m-win32.whl (38.5 kB view hashes)

Uploaded CPython 3.7m Windows x86

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