Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About the constant value of gamepad-related #577

Open
shiromofufactory opened this issue Oct 31, 2024 · 1 comment
Open

About the constant value of gamepad-related #577

shiromofufactory opened this issue Oct 31, 2024 · 1 comment

Comments

@shiromofufactory
Copy link

I have a question about the gamepad related inputs defined in 'pyxel/python/pyxel/init.pyi'.
What input does each of the following variables correspond to?

GAMEPAD1_AXIS_LEFTX: int
GAMEPAD1_AXIS_LEFTY: int
GAMEPAD1_AXIS_RIGHTX: int
GAMEPAD1_AXIS_RIGHTY: int
GAMEPAD1_AXIS_TRIGGERLEFT: int
GAMEPAD1_AXIS_TRIGGERRIGHT: int
GAMEPAD1_BUTTON_LEFTSTICK: int
GAMEPAD1_BUTTON_RIGHTSTICK: int

I am using a stock XBOX controller to check the response of the controller and each variable, and the input of the gamepad analog sticks (there are two, left and right) had no effect on any of the variables, including DPAD_xx.
Also, pressing the RB and LB buttons responded to GAMEPAD1_BUTTON_RIGHTSHOULDER and GAMEPAD1_BUTTON_LEFTSHOULDER, but the RT and LT buttons did not seem to affect any of the variables in any way, as did the analog sticks.

@shiromofufactory
Copy link
Author

The results were almost identical for the Nintendo Switch joycon. The 8 variables listed in the previous message did not change no matter what button was pressed, while GAMEPAD1_BUTTON_RIGHTSHOULDER and GAMEPAD1_BUTTON_LEFTSHOULDER responded to the R and L buttons.
The controller is connected to a Mac.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant