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

Issues with Switch Pro + Linux #294

Closed
clarfonthey opened this issue Nov 17, 2022 · 2 comments
Closed

Issues with Switch Pro + Linux #294

clarfonthey opened this issue Nov 17, 2022 · 2 comments

Comments

@clarfonthey
Copy link

clarfonthey commented Nov 17, 2022

Describe the bug
I'm testing out setting up mappings for a Switch Pro controller on Linux because the new hid-nintendo driver maps buttons differently than the current preset works.

To Reproduce

Current issues

  • The correct axes for the right stick are offset by one, meaning that the D-Pad X-axis controls the Y-axis of the right stick and the Y-axis of the right stick controls the X-axis of the right stick. Found out about the gamepad mappings config. Never mind.
  • The D-Pad isn't working, but this is probably tracked under D-pad not detected under Linux #241. I tried working around this by using trigger mappings, but it didn't work, and I'm not surprised.
  • The plus and minus buttons get interpreted as the stick buttons. Also solved by gamepad mappings.
  • The LT and RT buttons are treated as buttons on the Switch Pro, but the gamepad mappings only let them be treated as axes. Under the current configuration there's no way to make them be seen as separate codes -- for me, they tend to collide with other buttons. I managed to work around this by making them map to D-Pad L + R (which aren't working right now), but in the future, we should be able to treat these as buttons.
  • The screenshot button doesn't have a mapping on the UI, but this isn't super important. I mapped it to D-Pad down for now.

Suggested fixes

  • Ideally, analog sticks should be able to configure the axes explicitly rather than doing any extra multiplication logic. This way, we can account for unexpected setups where the X and Y axes are reversed or don't end up where we expect. This is literally a thing.
  • The key code for the stick buttons should just be configurable; that way, if it's not where we expect, there's still a workaround. Also a thing already.
  • D-Pad buttons should be representable with axes, but this is tracked in D-pad not detected under Linux #241.
  • LT + RT should be representable with buttons.
  • There should be an option for a "capture" or "share" button alongside the "guide" button since newer controllers also have this button. Not super important, but, might as well be a thing.

Additional information:

  • Plugin version: git commit 358bb3a
  • I would provide websocket server logs but I'm not sure how to filter out mouse input, and going to highlight the text in the browser example just floods the screen with mouse inputs.

(I figured that it's worth opening a separate ticket rather than adding my thoughts in another issue since I feel like this is a good test case for some current shortcomings of the Linux implementation, but feel free to close if you feel otherwise! Would also be happy to test any potential changes if needed.)

@univrsal
Copy link
Owner

I am aware that the gamepad library can't map buttons to axis and vice versa. I can't say when I'll get around to working on a fix

@univrsal
Copy link
Owner

univrsal commented Dec 5, 2022

See #297 for further tracking

@univrsal univrsal closed this as completed Dec 5, 2022
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

2 participants