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

Add API for gamepads and joysticks #4454

Open
2 tasks done
Jacalz opened this issue Dec 15, 2023 · 2 comments
Open
2 tasks done

Add API for gamepads and joysticks #4454

Jacalz opened this issue Dec 15, 2023 · 2 comments
Labels
Driver:desktop Issues relating to the desktop driver specifically enhancement New feature or request

Comments

@Jacalz
Copy link
Member

Jacalz commented Dec 15, 2023

Checklist

  • I have searched the issue tracker for open issues that relate to the same feature, before opening a new one.
  • This issue only relates to a single feature. I will open new issues for any other features.

Is your feature request related to a problem?

While Fyne isn't designed to be used for building games necessarily, there are other use-cases where it makes sense to have a clean and simple interface for accessing gamepads and joysticks. As an example, we are building a control application (not built in Fyne but might as well have been) for a remote controlled car and it would be nice to steer with the controller when not in automatic driving mode.

Is it possible to construct a solution with the existing API?

GLFW has some kind of support for joysticks and gamepads, see https://www.glfw.org/docs/latest/input_guide.html#joystick.

Describe the solution you'd like to see.

Some kind of coherent API, not necessarily too different from the keyboard button API, for accessing gamepads and joysticks.

@Jacalz Jacalz added enhancement New feature or request Driver:desktop Issues relating to the desktop driver specifically labels Dec 15, 2023
@andydotxyz
Copy link
Member

It's interesting to consider how remotes overlap with this. There is an open PR to add some android remote buttons and I wonder if it fits closer to gamepad than keyboard?

@Jacalz
Copy link
Member Author

Jacalz commented Dec 15, 2023

Yeah, I think that might be the case. I suspect that introducing gamepad buttons into the keyboard details would make us run into problems when we want to add joystick support (well, axis controls in general) later on down the line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Driver:desktop Issues relating to the desktop driver specifically enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants