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 an input-management layer #403

Open
patowen opened this issue Jun 21, 2024 · 1 comment
Open

Add an input-management layer #403

patowen opened this issue Jun 21, 2024 · 1 comment

Comments

@patowen
Copy link
Collaborator

patowen commented Jun 21, 2024

Currently, keyboard and mouse input is all handled in an ad-hoc manner in window.rs. Adding an extra layer of abstraction could help simplify the process of adding a new control. We could solve the following problems in one central place (although we don't need to solve them all now to resolve this issue):

  • Allowing rebinding of controls
  • Adding contextual controls
  • Having input presses that trigger an event on the next tick
  • Having an axis control for movement
  • Detecting conflicts (and allowing the same key to do multiple things if unambiguous enough)
  • etc. (This list is not exhaustive.)

Ideally, after this issue is done, if somebody wants to add a new key that does something, they'll just need to add the logic with minimal boilerplate code.

@Ralith
Copy link
Owner

Ralith commented Aug 7, 2024

This is very much needed. I've toyed with the idea of building something reusable inspired by OpenXR/Steam Input, but it's a hard design problem.

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