Ralith / hypermine

A hyperbolic voxel game
Apache License 2.0
160 stars 20 forks source link

Add an input-management layer #403

Open patowen opened 5 months ago

patowen commented 5 months ago

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):

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 commented 3 months ago

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.