Xbox series controller input

34 views Asked by At

I want to create a project that make controller text input and long story short, i need to listen for my right/left stick's direction(up, down, left, right) and XYAB buttons. thanks

i tried searching for python modules, but none were found for xbox series controllers

1

There are 1 answers

0
amirmohammad firouzfar On BEST ANSWER

You can use an inputs module:

from inputs import get_gamepad
while 1:
     events = get_gamepad()
     for event in events:
         print(event.ev_type, event.code, event.state)

This will get you started. For more information refer to the docs.