Skip to content

Add an input-management layer #403

Description

@patowen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions