Hey there!
Two weeks ago I started working on a small, open-source project, similar to GLFW.
I am currently stuck at lining out the proper interface for keyboards. As of now, I am having a static method `keyboard::is_pressed` and a huge enumeration with *some* keys,
I found on my keyboard. As the name already implies, `keyboard::is_pressed` asynchronously reads the keyboard state and returns true, if the physical key corresponding to the 'virtual key' - passed as argument - is pressed.
This approach, however, feels 'clumsy' or maybe even 'naive' and I feel like there could be a better way to solve this problem, which I am aware of.
So, therefore I am asking here:
Are there any patterns I am missing out on? Do you have any suggestions on how to solve this problem elegantly?
Regards,
Julian